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

--ZPt4rx8FFjLCG7dd
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
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)
=20
 	/* Get an interface unit number */
 	if ((error =3D ng_fec_get_unit(&priv->unit)) !=3D 0) {
-		FREE(ifp, M_NETGRAPH);
 		FREE(priv, M_NETGRAPH);
 		return (error);
 	}

--=20
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

--ZPt4rx8FFjLCG7dd
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

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

--ZPt4rx8FFjLCG7dd--



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