From: stsp Date: Sat, 10 Oct 2015 19:04:57 +0000 (+0000) Subject: In iwm(4), set mbuf pointers to NULL after freeing mbufs. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=0b7bc5f280292c368e701f236b66c93799b83c2f;p=openbsd In iwm(4), set mbuf pointers to NULL after freeing mbufs. ok phessler mpi zhuk --- diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c index 98fafd7f14a..7f7c26b8b4f 100644 --- a/sys/dev/pci/if_iwm.c +++ b/sys/dev/pci/if_iwm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwm.c,v 1.53 2015/10/06 09:12:00 stsp Exp $ */ +/* $OpenBSD: if_iwm.c,v 1.54 2015/10/10 19:04:57 stsp Exp $ */ /* * Copyright (c) 2014 genua mbh @@ -1062,6 +1062,7 @@ iwm_free_rx_ring(struct iwm_softc *sc, struct iwm_rx_ring *ring) data->map->dm_mapsize, BUS_DMASYNC_POSTREAD); bus_dmamap_unload(sc->sc_dmat, data->map); m_freem(data->m); + data->m = NULL; } if (data->map != NULL) bus_dmamap_destroy(sc->sc_dmat, data->map); @@ -1169,6 +1170,7 @@ iwm_free_tx_ring(struct iwm_softc *sc, struct iwm_tx_ring *ring) data->map->dm_mapsize, BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(sc->sc_dmat, data->map); m_freem(data->m); + data->m = NULL; } if (data->map != NULL) bus_dmamap_destroy(sc->sc_dmat, data->map);