Module Name: src
Committed By: ozaki-r
Date: Tue May 9 04:24:10 UTC 2017
Modified Files:
src/sys/netinet6: ip6_forward.c
Log Message:
Add missing KEY_FREESP to ip6_forward
To generate a diff of this commit:
cvs rdiff -u -r1.86 -r1.87 src/sys/netinet6/ip6_forward.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/netinet6/ip6_forward.c
diff -u src/sys/netinet6/ip6_forward.c:1.86 src/sys/netinet6/ip6_forward.c:1.87
--- src/sys/netinet6/ip6_forward.c:1.86 Tue Feb 14 03:05:06 2017
+++ src/sys/netinet6/ip6_forward.c Tue May 9 04:24:10 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: ip6_forward.c,v 1.86 2017/02/14 03:05:06 ozaki-r Exp $ */
+/* $NetBSD: ip6_forward.c,v 1.87 2017/05/09 04:24:10 ozaki-r Exp $ */
/* $KAME: ip6_forward.c,v 1.109 2002/09/11 08:10:17 sakane Exp $ */
/*
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip6_forward.c,v 1.86 2017/02/14 03:05:06 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip6_forward.c,v 1.87 2017/05/09 04:24:10 ozaki-r Exp $");
#ifdef _KERNEL_OPT
#include "opt_gateway.h"
@@ -460,6 +460,10 @@ ip6_forward(struct mbuf *m, int srcrt)
drop:
m_freem(m);
out:
+#ifdef IPSEC
+ if (sp != NULL)
+ KEY_FREESP(&sp);
+#endif
rtcache_unref(rt, ro);
if (ro != NULL)
percpu_putref(ip6_forward_rt_percpu);