diff options
author | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2008-07-29 10:05:39 +0000 |
---|---|---|
committer | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2008-07-29 10:05:39 +0000 |
commit | e537557552f7b1b43525cd67df64a5e81d650a8d (patch) | |
tree | d906911c78638004bd9c59d970fa10448b92d5b6 /sys/dev/pcmcia | |
parent | d20d421f2195309464cde6c4037e8565b1484f15 (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.c | 7 |
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 |