iwm(4): Fix possible null pointer indirection

Obtained from:	DragonFlyBSD (obtained from Haiku)
MFC after:	1 week
This commit is contained in:
Kyle Evans 2019-01-21 01:45:35 +00:00
parent c15f336dae
commit afbc939b81

View File

@ -1033,7 +1033,8 @@ iwm_reset_rx_ring(struct iwm_softc *sc, struct iwm_rx_ring *ring)
* The hw rx ring index in shared memory must also be cleared,
* otherwise the discrepancy can cause reprocessing chaos.
*/
memset(sc->rxq.stat, 0, sizeof(*sc->rxq.stat));
if (sc->rxq.stat)
memset(sc->rxq.stat, 0, sizeof(*sc->rxq.stat));
}
static void