Author: brueffer Date: Thu Oct 22 06:17:04 2009 New Revision: 198357 URL: http://svn.freebsd.org/changeset/base/198357
Log: Check pointer for NULL before dereferencing it, not after. PR: 138390 Submitted by: Patroklos Argyroudis <a...@census-labs.com> MFC after: 1 week Modified: head/sys/net/if_gif.c Modified: head/sys/net/if_gif.c ============================================================================== --- head/sys/net/if_gif.c Thu Oct 22 06:13:07 2009 (r198356) +++ head/sys/net/if_gif.c Thu Oct 22 06:17:04 2009 (r198357) @@ -507,7 +507,7 @@ gif_input(m, af, ifp) struct ifnet *ifp; { int isr, n; - struct gif_softc *sc = ifp->if_softc; + struct gif_softc *sc; struct etherip_header *eip; struct ether_header *eh; struct ifnet *oldifp; @@ -517,7 +517,7 @@ gif_input(m, af, ifp) m_freem(m); return; } - + sc = ifp->if_softc; m->m_pkthdr.rcvif = ifp; #ifdef MAC _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"