From e6ee9f6b3119b1039c7c45629337aa268eb99eb8 Mon Sep 17 00:00:00 2001 From: maxv Date: Fri, 2 Feb 2018 10:49:01 +0000 Subject: [PATCH] Fix memory leak. Contrary to what the XXX indicates, this place is 100% reachable remotely. --- sys/netinet6/nd6_nbr.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/netinet6/nd6_nbr.c b/sys/netinet6/nd6_nbr.c index ebc5bacc7dbd..91c422b9069a 100644 --- a/sys/netinet6/nd6_nbr.c +++ b/sys/netinet6/nd6_nbr.c @@ -1,4 +1,4 @@ -/* $NetBSD: nd6_nbr.c,v 1.144 2018/01/16 08:13:47 ozaki-r Exp $ */ +/* $NetBSD: nd6_nbr.c,v 1.145 2018/02/02 10:49:01 maxv Exp $ */ /* $KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $ */ /* @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.144 2018/01/16 08:13:47 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.145 2018/02/02 10:49:01 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -607,8 +607,7 @@ nd6_na_input(struct mbuf *m, int off, int icmp6len) taddr6 = nd_na->nd_na_target; if (in6_setscope(&taddr6, ifp, NULL)) { - m_put_rcvif_psref(ifp, &psref); - return; /* XXX: impossible */ + goto bad; } if (IN6_IS_ADDR_MULTICAST(&taddr6)) {