diff options
author | Ryan Thomas McBride <mcbride@cvs.openbsd.org> | 2003-10-25 19:31:06 +0000 |
---|---|---|
committer | Ryan Thomas McBride <mcbride@cvs.openbsd.org> | 2003-10-25 19:31:06 +0000 |
commit | 5e1f634765a112db3ba846bc4bb7d9c426dac02d (patch) | |
tree | 7e09adbd078b464fba27ce8ba76574b3ec9bf1da /sys/net | |
parent | 9b1c2ad0d5df27b0a8cd3b342885fa8b4c4a4c58 (diff) |
"goto bad" on error with carp_input, instead of simply returning.
Fixes leakage of mbufs on error.
Pointed out by Max Laier.
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if_ethersubr.c | 4 | ||||
-rw-r--r-- | sys/net/if_fddisubr.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index 384ae43f0b8..56c2f535320 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ethersubr.c,v 1.71 2003/10/17 21:04:58 mcbride Exp $ */ +/* $OpenBSD: if_ethersubr.c,v 1.72 2003/10/25 19:31:05 mcbride Exp $ */ /* $NetBSD: if_ethersubr.c,v 1.19 1996/05/07 02:40:30 thorpej Exp $ */ /* @@ -565,7 +565,7 @@ ether_output(ifp, m0, dst, rt0) int error; error = carp_output(ifp, m, dst, NULL); if (error) - return (error); + goto bad; } #endif diff --git a/sys/net/if_fddisubr.c b/sys/net/if_fddisubr.c index e77dad458db..5c08c95dd6f 100644 --- a/sys/net/if_fddisubr.c +++ b/sys/net/if_fddisubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_fddisubr.c,v 1.34 2003/10/17 21:04:58 mcbride Exp $ */ +/* $OpenBSD: if_fddisubr.c,v 1.35 2003/10/25 19:31:05 mcbride Exp $ */ /* $NetBSD: if_fddisubr.c,v 1.5 1996/05/07 23:20:21 christos Exp $ */ /* @@ -436,7 +436,7 @@ fddi_output(ifp, m0, dst, rt0) int error; error = carp_output(ifp, m, NULL, NULL); if (error) - return (error); + goto bad; } #endif |