Source-Changes-HG archive

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

[src/trunk]: src/sys/netinet6 Free rtentry when we successfully obtain it but...



details:   https://anonhg.NetBSD.org/src/rev/45ecbd18f18a
branches:  trunk
changeset: 809945:45ecbd18f18a
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Tue Aug 11 08:27:08 2015 +0000

description:
Free rtentry when we successfully obtain it but return NULL

diffstat:

 sys/netinet6/nd6.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r ce6cea8c3681 -r 45ecbd18f18a sys/netinet6/nd6.c
--- a/sys/netinet6/nd6.c        Tue Aug 11 04:25:13 2015 +0000
+++ b/sys/netinet6/nd6.c        Tue Aug 11 08:27:08 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nd6.c,v 1.166 2015/08/07 08:11:33 ozaki-r Exp $        */
+/*     $NetBSD: nd6.c,v 1.167 2015/08/11 08:27:08 ozaki-r Exp $        */
 /*     $KAME: nd6.c,v 1.279 2002/06/08 11:16:51 itojun Exp $   */
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.166 2015/08/07 08:11:33 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.167 2015/08/11 08:27:08 ozaki-r Exp $");
 
 #include "opt_net_mpsafe.h"
 
@@ -959,6 +959,7 @@
                            ip6_sprintf(addr6),
                            ifp ? if_name(ifp) : "unspec"));
                }
+               rtfree(rt);
                return NULL;
        }
        return rt;



Home | Main Index | Thread Index | Old Index