summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2002-01-02 20:06:04 +0000
committerJason Wright <jason@cvs.openbsd.org>2002-01-02 20:06:04 +0000
commitf6499d68dcea61f2af6730603c947ad246c8212d (patch)
treecfea0b28abe2d9dd0305f80e710be81922b2a2f8 /sys/net
parent34692c4408203b5198558b488db7217c6a1c76cf (diff)
Don't forget to deallocate on failure.
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_bridge.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c
index 5818f423f13..dafc14f408f 100644
--- a/sys/net/if_bridge.c
+++ b/sys/net/if_bridge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bridge.c,v 1.82 2002/01/01 22:39:45 jason Exp $ */
+/* $OpenBSD: if_bridge.c,v 1.83 2002/01/02 20:06:03 jason Exp $ */
/*
* Copyright (c) 1999, 2000 Jason L. Wright (jason@thought.net)
@@ -1426,12 +1426,13 @@ bridge_broadcast(sc, ifp, eh, m)
m2 = m_copym2(m, sizeof(struct ether_header),
M_COPYALL, M_DONTWAIT);
if (m2 == NULL) {
+ m_freem(m1);
sc->sc_if.if_oerrors++;
continue;
}
for (mx = m1; mx->m_next != NULL; mx = mx->m_next)
- ;
+ /*EMPTY*/;
mx->m_next = m2;
if (m1->m_flags & M_PKTHDR) {