From cb15f3fd242f216ed7b341d7dad9039602ac7c9e Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Sun, 2 Mar 2008 00:02:12 +0000 Subject: If bus_dmamap_load_mbuf() fails in em_get_buf() use m_freem() intead of m_free() to free the mbuf cluster. ok krw@ mglocker@ --- sys/dev/pci/if_em.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys') diff --git a/sys/dev/pci/if_em.c b/sys/dev/pci/if_em.c index daf810c18fd..09abb4f951d 100644 --- a/sys/dev/pci/if_em.c +++ b/sys/dev/pci/if_em.c @@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE. ***************************************************************************/ -/* $OpenBSD: if_em.c,v 1.178 2008/02/27 20:05:51 brad Exp $ */ +/* $OpenBSD: if_em.c,v 1.179 2008/03/02 00:02:11 brad Exp $ */ /* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */ #include @@ -2264,7 +2264,7 @@ em_get_buf(struct em_softc *sc, int i) error = bus_dmamap_load_mbuf(sc->rxtag, sc->rx_sparemap, m, BUS_DMA_NOWAIT); if (error) { - m_free(m); + m_freem(m); return (error); } -- cgit v1.2.3