summaryrefslogtreecommitdiff
path: root/sys/dev/pcmcia
diff options
context:
space:
mode:
authorThordur I. Bjornsson <thib@cvs.openbsd.org>2008-07-29 10:05:39 +0000
committerThordur I. Bjornsson <thib@cvs.openbsd.org>2008-07-29 10:05:39 +0000
commite537557552f7b1b43525cd67df64a5e81d650a8d (patch)
treed906911c78638004bd9c59d970fa10448b92d5b6 /sys/dev/pcmcia
parentd20d421f2195309464cde6c4037e8565b1484f15 (diff)
check for m_devget() returning NULL, increment ierror count
and just return; OK mglocker@
Diffstat (limited to 'sys/dev/pcmcia')
-rw-r--r--sys/dev/pcmcia/if_malo.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/pcmcia/if_malo.c b/sys/dev/pcmcia/if_malo.c
index 3ae1102cb25..d8ff907f818 100644
--- a/sys/dev/pcmcia/if_malo.c
+++ b/sys/dev/pcmcia/if_malo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_malo.c,v 1.62 2008/07/27 13:02:37 mglocker Exp $ */
+/* $OpenBSD: if_malo.c,v 1.63 2008/07/29 10:05:38 thib Exp $ */
/*
* Copyright (c) 2007 Marcus Glocker <mglocker@openbsd.org>
@@ -929,6 +929,11 @@ cmalo_rx(struct malo_softc *sc)
/* prepare mbuf */
m = m_devget(sc->sc_data + rxdesc->pkgoffset - ETHER_ALIGN,
rxdesc->pkglen + ETHER_ALIGN, 0, ifp, NULL);
+ if (m == NULL) {
+ DPRINTF(1, "RX m_devget failed!\n");
+ ifp->if_ierrors++;
+ return;
+ }
m_adj(m, ETHER_ALIGN);
#if NBPFILTER > 0