Date: Mon, 23 Jul 2007 14:31:11 GMT From: Tai-hwa Liang <avatar@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 123963 for review Message-ID: <200707231431.l6NEVBa6073254@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=123963 Change 123963 by avatar@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200707231431.l6NEVBa6073254>