Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net Add missing NULL check
details: https://anonhg.NetBSD.org/src/rev/732ff4183025
branches: trunk
changeset: 352121:732ff4183025
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Fri Mar 17 10:05:02 2017 +0000
description:
Add missing NULL check
Fix PR kern/52083
diffstat:
sys/net/rtsock.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (29 lines):
diff -r 640c346c4323 -r 732ff4183025 sys/net/rtsock.c
--- a/sys/net/rtsock.c Fri Mar 17 08:51:44 2017 +0000
+++ b/sys/net/rtsock.c Fri Mar 17 10:05:02 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rtsock.c,v 1.208 2017/03/14 09:39:28 ozaki-r Exp $ */
+/* $NetBSD: rtsock.c,v 1.209 2017/03/17 10:05:02 ozaki-r Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.208 2017/03/14 09:39:28 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.209 2017/03/17 10:05:02 ozaki-r Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -637,8 +637,8 @@
}
if (ifa) {
struct ifaddr *oifa = rt->rt_ifa;
- if (oifa != ifa &&
- !ifa_is_destroying(ifa) && !if_is_deactivated(new_ifp)) {
+ if (oifa != ifa && !ifa_is_destroying(ifa) &&
+ new_ifp != NULL && !if_is_deactivated(new_ifp)) {
if (oifa && oifa->ifa_rtrequest)
oifa->ifa_rtrequest(RTM_DELETE, rt, info);
rt_replace_ifa(rt, ifa);
Home |
Main Index |
Thread Index |
Old Index