Source-Changes-HG archive

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

[src/netbsd-8]: src/sys/net Pull up following revision(s) (requested by ozaki...



details:   https://anonhg.NetBSD.org/src/rev/ba5588121406
branches:  netbsd-8
changeset: 449663:ba5588121406
user:      martin <martin%NetBSD.org@localhost>
date:      Fri Mar 15 14:44:05 2019 +0000

description:
Pull up following revision(s) (requested by ozaki-r in ticket #1215):

        sys/net/route.c: revision 1.217

Add missing ifa_release on error paths

diffstat:

 sys/net/route.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (35 lines):

diff -r 6f2b2502a16b -r ba5588121406 sys/net/route.c
--- a/sys/net/route.c   Fri Mar 15 14:30:19 2019 +0000
+++ b/sys/net/route.c   Fri Mar 15 14:44:05 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: route.c,v 1.194.6.12 2018/11/06 14:38:58 martin Exp $  */
+/*     $NetBSD: route.c,v 1.194.6.13 2019/03/15 14:44:05 martin Exp $  */
 
 /*-
  * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.194.6.12 2018/11/06 14:38:58 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.194.6.13 2019/03/15 14:44:05 martin Exp $");
 
 #include <sys/param.h>
 #ifdef RTFLUSH_DEBUG
@@ -1504,6 +1504,8 @@
                }
                if (new_ifa == NULL)
                        ifa_release(ifa, &psref_ifa);
+               /* To avoid ifa_release below */
+               ifa = NULL;
        }
        ifa_release(new_ifa, &psref_new_ifa);
        if (new_ifp && rt->rt_ifp != new_ifp && !if_is_deactivated(new_ifp)) {
@@ -1525,6 +1527,7 @@
        (void)ifp_changed; /* XXX gcc */
 #endif
 out:
+       ifa_release(ifa, &psref_ifa);
        if_put(new_ifp, &psref_new_ifp);
        if_put(ifp, &psref_ifp);
 



Home | Main Index | Thread Index | Old Index