PERFORCE change 123963 for review
Tai-hwa Liang
avatar at FreeBSD.org
Mon Jul 23 14:31:12 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=123963
Change 123963 by avatar at avatar_t40 on 2007/07/23 14:30:22
Fixing a possible NULL pointer dereference by making the actual
assignment after the NULL check.
Found by: Coverity Prevent(tm)
CID: 2303
Reviewed by: sam
MFP4 after: 1 week
Affected files ...
.. //depot/projects/wifi/sys/dev/wi/if_wi.c#40 edit
Differences ...
==== //depot/projects/wifi/sys/dev/wi/if_wi.c#40 (text+ko) ====
@@ -267,12 +267,12 @@
int error;
ifp = sc->sc_ifp = if_alloc(IFT_ETHER);
- ifp->if_softc = sc;
if (ifp == NULL) {
device_printf(dev, "can not if_alloc\n");
wi_free(dev);
return (ENOSPC);
}
+ ifp->if_softc = sc;
/*
* NB: no locking is needed here; don't put it here
More information about the p4-projects
mailing list