summaryrefslogtreecommitdiff
path: root/sys/net/if_trunk.c
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2011-01-28 14:20:38 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2011-01-28 14:20:38 +0000
commit4229e5a04a479691c041e9b9f03bbba19207ddd0 (patch)
tree1329d8d87af4aa173605530f2390544d971eb479 /sys/net/if_trunk.c
parent3656332571b9b8386610d71b56af853f2a86da95 (diff)
Fix another memory leak by replacing m_free() with m_freem() in trunk's
broadcast mode. ok blambert@ mikeb@
Diffstat (limited to 'sys/net/if_trunk.c')
-rw-r--r--sys/net/if_trunk.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/net/if_trunk.c b/sys/net/if_trunk.c
index 4c1c90e3503..b61dcaa1618 100644
--- a/sys/net/if_trunk.c
+++ b/sys/net/if_trunk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_trunk.c,v 1.76 2010/11/12 13:26:29 dhill Exp $ */
+/* $OpenBSD: if_trunk.c,v 1.77 2011/01/28 14:20:37 reyk Exp $ */
/*
* Copyright (c) 2005, 2006, 2007 Reyk Floeter <reyk@openbsd.org>
@@ -1515,7 +1515,7 @@ trunk_bcast_start(struct trunk_softc *tr, struct mbuf *m)
if (active_ports) {
n = m_copym(m, 0, M_COPYALL, M_DONTWAIT);
if (n == NULL) {
- m_free(m);
+ m_freem(m);
return (ENOBUFS);
}
} else
@@ -1526,7 +1526,7 @@ trunk_bcast_start(struct trunk_softc *tr, struct mbuf *m)
}
}
if (active_ports == 0) {
- m_free(m);
+ m_freem(m);
return (ENOENT);
}
if (errors == active_ports)