Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netinet6 Fix memory leak. Contrary to what the XXX indic...



details:   https://anonhg.NetBSD.org/src/rev/2f6c93c00b9c
branches:  trunk
changeset: 829472:2f6c93c00b9c
user:      maxv <maxv%NetBSD.org@localhost>
date:      Fri Feb 02 10:49:01 2018 +0000

description:
Fix memory leak. Contrary to what the XXX indicates, this place is 100%
reachable remotely.

diffstat:

 sys/netinet6/nd6_nbr.c |  7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diffs (28 lines):

diff -r 761e885dde9d -r 2f6c93c00b9c sys/netinet6/nd6_nbr.c
--- a/sys/netinet6/nd6_nbr.c    Fri Feb 02 09:01:17 2018 +0000
+++ b/sys/netinet6/nd6_nbr.c    Fri Feb 02 10:49:01 2018 +0000
@@ -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 <sys/cdefs.h>
-__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 @@
 
        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)) {



Home | Main Index | Thread Index | Old Index