Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 2 Apr 2005 21:06:46 -0800
From:      Brooks Davis <brooks@one-eyed-alien.net>
To:        net@freebsd.org
Subject:   potential double free in ng_fec
Message-ID:  <20050403050646.GA5749@odin.ac.hmc.edu>

next in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
I think I've found a potential (though very very unlikely) double free
bug in netgraph/ng_fec.c.  Can someone else confirm this is correct?  I
don't have any way of testing this code.

-- Brooks

Index: ng_fec.c
===================================================================
RCS file: /home/ncvs/src/sys/netgraph/ng_fec.c,v
retrieving revision 1.17
diff -u -p -r1.17 ng_fec.c
--- ng_fec.c	8 Feb 2005 10:31:55 -0000	1.17
+++ ng_fec.c	3 Apr 2005 05:04:06 -0000
@@ -1114,7 +1114,6 @@ ng_fec_constructor(node_p node)
 
 	/* Get an interface unit number */
 	if ((error = ng_fec_get_unit(&priv->unit)) != 0) {
-		FREE(ifp, M_NETGRAPH);
 		FREE(priv, M_NETGRAPH);
 		return (error);
 	}

-- 
Any statement of the form "X is the one, true Y" is FALSE.
PGP fingerprint 655D 519C 26A7 82E7 2529  9BF0 5D8E 8BE9 F238 1AD4

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQFCT3nmXY6L6fI4GtQRAmCfAJ9mFa313gkQlrlYBdl/1OJobTVawACgw37v
9pewucdubxxKA18ySHRC5og=
=IDXu
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050403050646.GA5749>