summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjon <jon@FreeBSD.org>2001-08-02 19:56:29 +0000
committerjon <jon@FreeBSD.org>2001-08-02 19:56:29 +0000
commitad8e414cce2c897b9ecffdc3613102c7302b2074 (patch)
tree1a1a4e2941c971c0d24d2615bf633db46fac2f4f
parent79a9463a45b719bbba9360fdaf97fdad62f899ec (diff)
downloadFreeBSD-src-ad8e414cce2c897b9ecffdc3613102c7302b2074.zip
FreeBSD-src-ad8e414cce2c897b9ecffdc3613102c7302b2074.tar.gz
fix memory leak when error during opening of routing socket
PR: kern/29336 Submitted by: Richard Andrades <richard@xebeo.com> MFC after: 1 month
-rw-r--r--sys/net/rtsock.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c
index 67c79b6..e8e85eb 100644
--- a/sys/net/rtsock.c
+++ b/sys/net/rtsock.c
@@ -127,6 +127,7 @@ rts_attach(struct socket *so, int proto, struct proc *p)
rp = sotorawcb(so);
if (error) {
splx(s);
+ so->so_pcb = NULL;
free(rp, M_PCB);
return error;
}
OpenPOWER on IntegriCloud