diff options
author | Jason Wright <jason@cvs.openbsd.org> | 2003-02-21 21:49:38 +0000 |
---|---|---|
committer | Jason Wright <jason@cvs.openbsd.org> | 2003-02-21 21:49:38 +0000 |
commit | 090cae0beb9836bc569331523025c05ee86063fc (patch) | |
tree | 0d3dec99e19410c6358b1e34efc7addfe4300301 /sys/net/if_bridge.c | |
parent | d61770ecc047b10ce72248da2e88c1b0942f1e9b (diff) |
Plug two mbuf leak on error bugs, one from dhartmei one from me.
Diffstat (limited to 'sys/net/if_bridge.c')
-rw-r--r-- | sys/net/if_bridge.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index 98b2b61919a..388315faff9 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bridge.c,v 1.111 2003/02/17 18:23:22 jason Exp $ */ +/* $OpenBSD: if_bridge.c,v 1.112 2003/02/21 21:49:37 jason Exp $ */ /* * Copyright (c) 1999, 2000 Jason L. Wright (jason@thought.net) @@ -2648,11 +2648,15 @@ bridge_send_icmp_err(sc, ifp, eh, n, hassnap, llc, type, code) u_int8_t ether_tmp[ETHER_ADDR_LEN]; n2 = m_copym(n, 0, M_COPYALL, M_DONTWAIT); - if (!n2) + if (!n2) { + m_freem(n); return; + } m = icmp_do_error(n, type, code, 0, ifp); - if (m == NULL) + if (m == NULL) { + m_freem(n2); return; + } n = n2; |