Module Name: src Committed By: maxv Date: Mon Feb 12 17:04:58 UTC 2018
Modified Files: src/sys/arch/arm/sunxi: sun4i_emac.c Log Message: Another missing NULL-check. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/sunxi/sun4i_emac.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/arch/arm/sunxi/sun4i_emac.c diff -u src/sys/arch/arm/sunxi/sun4i_emac.c:1.2 src/sys/arch/arm/sunxi/sun4i_emac.c:1.3 --- src/sys/arch/arm/sunxi/sun4i_emac.c:1.2 Thu Nov 30 18:29:25 2017 +++ src/sys/arch/arm/sunxi/sun4i_emac.c Mon Feb 12 17:04:58 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: sun4i_emac.c,v 1.2 2017/11/30 18:29:25 jmcneill Exp $ */ +/* $NetBSD: sun4i_emac.c,v 1.3 2018/02/12 17:04:58 maxv Exp $ */ /*- * Copyright (c) 2013-2017 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include <sys/cdefs.h> -__KERNEL_RCSID(1, "$NetBSD: sun4i_emac.c,v 1.2 2017/11/30 18:29:25 jmcneill Exp $"); +__KERNEL_RCSID(1, "$NetBSD: sun4i_emac.c,v 1.3 2018/02/12 17:04:58 maxv Exp $"); #include <sys/param.h> #include <sys/bus.h> @@ -509,6 +509,9 @@ sun4i_emac_mgethdr(struct sun4i_emac_sof { struct mbuf *m = m_gethdr(M_DONTWAIT, MT_DATA); + if (m == NULL) { + return NULL; + } if (rxlen + 2 > MHLEN) { MCLGET(m, M_DONTWAIT); if ((m->m_flags & M_EXT) == 0) {