From be731c30f3266b890ea7521e543b7ed7e2b3e0db Mon Sep 17 00:00:00 2001 From: Archie Cobbs Date: Wed, 11 Oct 2000 19:04:34 +0000 Subject: [PATCH] Fix memory leak. Submitted by: Christopher N. Harrell --- sys/netgraph/ng_ksocket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netgraph/ng_ksocket.c b/sys/netgraph/ng_ksocket.c index 03435b91478c..73e85a21a183 100644 --- a/sys/netgraph/ng_ksocket.c +++ b/sys/netgraph/ng_ksocket.c @@ -850,7 +850,6 @@ ng_ksocket_incoming(struct socket *so, void *arg, int waitflag) const node_p node = arg; const priv_p priv = node->private; meta_p meta = NULL; - struct sockaddr *nam; struct mbuf *m; struct uio auio; int s, flags, error; @@ -871,7 +870,8 @@ ng_ksocket_incoming(struct socket *so, void *arg, int waitflag) flags = MSG_DONTWAIT; do { if ((error = (*so->so_proto->pr_usrreqs->pru_soreceive) - (so, &nam, &auio, &m, (struct mbuf **)0, &flags)) == 0 + (so, (struct sockaddr **)0, &auio, &m, + (struct mbuf **)0, &flags)) == 0 && m != NULL) { struct mbuf *n;