Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet6 Add missing NULL check
details: https://anonhg.NetBSD.org/src/rev/e83a430148b5
branches: trunk
changeset: 356611:e83a430148b5
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Thu Oct 05 03:42:14 2017 +0000
description:
Add missing NULL check
PR kern/52554
diffstat:
sys/netinet6/nd6.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diffs (30 lines):
diff -r b5603eb80a2c -r e83a430148b5 sys/netinet6/nd6.c
--- a/sys/netinet6/nd6.c Thu Oct 05 03:24:40 2017 +0000
+++ b/sys/netinet6/nd6.c Thu Oct 05 03:42:14 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nd6.c,v 1.235 2017/06/22 09:24:02 ozaki-r Exp $ */
+/* $NetBSD: nd6.c,v 1.236 2017/10/05 03:42:14 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.235 2017/06/22 09:24:02 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.236 2017/10/05 03:42:14 ozaki-r Exp $");
#ifdef _KERNEL_OPT
#include "opt_net_mpsafe.h"
@@ -2321,6 +2321,11 @@
created = true;
}
+ if (ln == NULL) {
+ m_freem(m);
+ return ENETDOWN; /* better error? */
+ }
+
LLE_WLOCK_ASSERT(ln);
/* We don't have to do link-layer address resolution on a p2p link. */
Home |
Main Index |
Thread Index |
Old Index