mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-17 10:26:15 +00:00
Check pointer before dereferencing.
Reported by: Coverity CID: 1556
This commit is contained in:
parent
1ca2c0183f
commit
e4c185db7a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=163475
@ -835,7 +835,7 @@ ngs_rcvmsg(node_p node, item_p item, hook_p lasthook)
|
||||
{
|
||||
struct ngsock *const priv = NG_NODE_PRIVATE(node);
|
||||
struct ngpcb *const pcbp = priv->ctlsock;
|
||||
struct socket *const so = pcbp->ng_socket;
|
||||
struct socket *so;
|
||||
struct sockaddr_ng addr;
|
||||
struct ng_mesg *msg;
|
||||
struct mbuf *m;
|
||||
@ -855,6 +855,7 @@ ngs_rcvmsg(node_p node, item_p item, hook_p lasthook)
|
||||
NG_FREE_MSG(msg);
|
||||
return (EINVAL);
|
||||
}
|
||||
so = pcbp->ng_socket;
|
||||
|
||||
#ifdef TRACE_MESSAGES
|
||||
printf("[%x]:---------->[socket]: c=<%d>cmd=%x(%s) f=%x #%d\n",
|
||||
|
Loading…
Reference in New Issue
Block a user