svn commit: r298659 - head/sys/dev/iwm
Conrad E. Meyer
cem at FreeBSD.org
Tue Apr 26 19:06:30 UTC 2016
Author: cem
Date: Tue Apr 26 19:06:28 2016
New Revision: 298659
URL: https://svnweb.freebsd.org/changeset/base/298659
Log:
iwm(4): Don't dereference potentially NULL pointer before NULL check
Introduced in r298594. There is no path before the 'vap == NULL' check where
vap is not already dereferenced.
Reported by: Coverity
CID: 1354979
Sponsored by: EMC / Isilon Storage Division
Modified:
head/sys/dev/iwm/if_iwm.c
Modified: head/sys/dev/iwm/if_iwm.c
==============================================================================
--- head/sys/dev/iwm/if_iwm.c Tue Apr 26 18:54:44 2016 (r298658)
+++ head/sys/dev/iwm/if_iwm.c Tue Apr 26 19:06:28 2016 (r298659)
@@ -4377,7 +4377,7 @@ iwm_intr(void *arg)
device_printf(sc->sc_dev,
" rx ring: cur=%d\n", sc->rxq.cur);
device_printf(sc->sc_dev,
- " 802.11 state %d\n", vap->iv_state);
+ " 802.11 state %d\n", (vap == NULL) ? -1 : vap->iv_state);
/* Don't stop the device; just do a VAP restart */
IWM_UNLOCK(sc);
More information about the svn-src-head
mailing list