Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/allwinner NULL-check after M_DONTWAIT.
details: https://anonhg.NetBSD.org/src/rev/e9d783805172
branches: trunk
changeset: 359483:e9d783805172
user: maxv <maxv%NetBSD.org@localhost>
date: Mon Feb 12 16:58:01 2018 +0000
description:
NULL-check after M_DONTWAIT.
diffstat:
sys/arch/arm/allwinner/awin_eth.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diffs (22 lines):
diff -r 71544719b75e -r e9d783805172 sys/arch/arm/allwinner/awin_eth.c
--- a/sys/arch/arm/allwinner/awin_eth.c Mon Feb 12 16:01:35 2018 +0000
+++ b/sys/arch/arm/allwinner/awin_eth.c Mon Feb 12 16:58:01 2018 +0000
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: awin_eth.c,v 1.11 2016/06/10 13:27:10 ozaki-r Exp $");
+__KERNEL_RCSID(1, "$NetBSD: awin_eth.c,v 1.12 2018/02/12 16:58:01 maxv Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -401,6 +401,9 @@
{
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) {
Home |
Main Index |
Thread Index |
Old Index