From 278184a8abff46f49a3ed29eafc45dcb7b704bd9 Mon Sep 17 00:00:00 2001 From: itojun Date: Tue, 20 Jun 2000 02:24:42 +0000 Subject: [PATCH] avoid possible mbuf leaks on ipsec policy violation.(sync with kame) --- sys/netinet6/ip6_output.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c index 8daf101b1532..1f9ca90fdf2d 100644 --- a/sys/netinet6/ip6_output.c +++ b/sys/netinet6/ip6_output.c @@ -1,4 +1,4 @@ -/* $NetBSD: ip6_output.c,v 1.22 2000/06/03 14:36:37 itojun Exp $ */ +/* $NetBSD: ip6_output.c,v 1.23 2000/06/20 02:24:42 itojun Exp $ */ /* $KAME: ip6_output.c,v 1.109 2000/05/31 05:03:09 jinmei Exp $ */ /* @@ -206,7 +206,7 @@ ip6_output(m0, opt, ro, flags, im6o, ifpp) if (sp == NULL) { ipsec6stat.out_inval++; - goto bad; + goto freehdrs; } error = 0; @@ -218,7 +218,7 @@ ip6_output(m0, opt, ro, flags, im6o, ifpp) * This packet is just discarded. */ ipsec6stat.out_polvio++; - goto bad; + goto freehdrs; case IPSEC_POLICY_BYPASS: case IPSEC_POLICY_NONE: @@ -231,7 +231,7 @@ ip6_output(m0, opt, ro, flags, im6o, ifpp) /* XXX should be panic ? */ printf("ip6_output: No IPsec request specified.\n"); error = EINVAL; - goto bad; + goto freehdrs; } needipsec = 1; break;