Module Name: src
Committed By: plunky
Date: Sun Nov 29 10:44:23 UTC 2009
Modified Files:
src/sys/net: if_tap.c
Log Message:
fix a potential leak on tap device close, purging the send queue
did not actually release the dequeued mbufs.
pointed out by Paul Forgey on tech-net
To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/sys/net/if_tap.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/net/if_tap.c
diff -u src/sys/net/if_tap.c:1.59 src/sys/net/if_tap.c:1.60
--- src/sys/net/if_tap.c:1.59 Tue Sep 15 19:38:15 2009
+++ src/sys/net/if_tap.c Sun Nov 29 10:44:23 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: if_tap.c,v 1.59 2009/09/15 19:38:15 drochner Exp $ */
+/* $NetBSD: if_tap.c,v 1.60 2009/11/29 10:44:23 plunky Exp $ */
/*
* Copyright (c) 2003, 2004, 2008, 2009 The NetBSD Foundation.
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_tap.c,v 1.59 2009/09/15 19:38:15 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_tap.c,v 1.60 2009/11/29 10:44:23 plunky Exp $");
#if defined(_KERNEL_OPT)
#include "bpfilter.h"
@@ -859,6 +859,7 @@
if (ifp->if_bpf)
bpf_mtap(ifp->if_bpf, m);
#endif
+ m_freem(m);
}
}
splx(s);