Module Name: src Committed By: knakahara Date: Thu Dec 10 08:11:03 UTC 2015
Modified Files: src/sys/net: if_gif.c Log Message: kmem_zalloc(, KM_SLEEP) must not return NULL. To generate a diff of this commit: cvs rdiff -u -r1.99 -r1.100 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.99 src/sys/net/if_gif.c:1.100 --- src/sys/net/if_gif.c:1.99 Thu Dec 10 01:20:12 2015 +++ src/sys/net/if_gif.c Thu Dec 10 08:11:03 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: if_gif.c,v 1.99 2015/12/10 01:20:12 knakahara Exp $ */ +/* $NetBSD: if_gif.c,v 1.100 2015/12/10 08:11:03 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.99 2015/12/10 01:20:12 knakahara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_gif.c,v 1.100 2015/12/10 08:11:03 knakahara Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -131,8 +131,7 @@ 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; + KASSERT(sc != NULL); if_initname(&sc->gif_if, ifc->ifc_name, unit);