Module Name:    src
Committed By:   knakahara
Date:           Thu Dec 10 01:20:13 UTC 2015

Modified Files:
        src/sys/net: if_gif.c

Log Message:
add NULL check


To generate a diff of this commit:
cvs rdiff -u -r1.98 -r1.99 src/sys/net/if_gif.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/net/if_gif.c
diff -u src/sys/net/if_gif.c:1.98 src/sys/net/if_gif.c:1.99
--- src/sys/net/if_gif.c:1.98	Wed Dec  9 05:56:24 2015
+++ src/sys/net/if_gif.c	Thu Dec 10 01:20:12 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_gif.c,v 1.98 2015/12/09 05:56:24 knakahara Exp $	*/
+/*	$NetBSD: if_gif.c,v 1.99 2015/12/10 01:20:12 knakahara Exp $	*/
 /*	$KAME: if_gif.c,v 1.76 2001/08/20 02:01:02 kjc Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_gif.c,v 1.98 2015/12/09 05:56:24 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_gif.c,v 1.99 2015/12/10 01:20:12 knakahara Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -131,6 +131,8 @@ gif_clone_create(struct if_clone *ifc, i
 	struct gif_softc *sc;
 
 	sc = kmem_zalloc(sizeof(struct gif_softc), KM_SLEEP);
+	if (sc == NULL)
+		return ENOMEM;
 
 	if_initname(&sc->gif_if, ifc->ifc_name, unit);
 

Reply via email to