summaryrefslogtreecommitdiffstats
path: root/sys/net/if_ethersubr.c
diff options
context:
space:
mode:
authorreyk <reyk@openbsd.org>2011-01-28 13:19:44 +0000
committerreyk <reyk@openbsd.org>2011-01-28 13:19:44 +0000
commiteb6b9d6e8c559caa1ea8f79a16070535c981ceab (patch)
tree785775d964acc2bc12eed6cacd7701f66bc27592 /sys/net/if_ethersubr.c
parentdocument available authentication types and formats. (diff)
downloadwireguard-openbsd-eb6b9d6e8c559caa1ea8f79a16070535c981ceab.tar.xz
wireguard-openbsd-eb6b9d6e8c559caa1ea8f79a16070535c981ceab.zip
Change an m_free() to m_freem() to free the whole mbuf chain and to prevent
a possible memory leak with bpf's BIOCSFILDROP option which is currently used by dhcpd and dhclient. Found by gollo@
Diffstat (limited to 'sys/net/if_ethersubr.c')
-rw-r--r--sys/net/if_ethersubr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
index 081221be062..9aad1ce5703 100644
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ethersubr.c,v 1.147 2010/10/11 11:31:14 claudio Exp $ */
+/* $OpenBSD: if_ethersubr.c,v 1.148 2011/01/28 13:19:44 reyk Exp $ */
/* $NetBSD: if_ethersubr.c,v 1.19 1996/05/07 02:40:30 thorpej Exp $ */
/*
@@ -670,7 +670,7 @@ ether_input(ifp0, eh, m)
* If packet has been filtered by the bpf listener, drop it now
*/
if (m->m_flags & M_FILDROP) {
- m_free(m);
+ m_freem(m);
return;
}