Date: Thu, 22 Oct 2009 06:17:04 +0000 (UTC) From: Christian Brueffer <brueffer@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r198357 - head/sys/net Message-ID: <200910220617.n9M6H4Tk020986@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <argp@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910220617.n9M6H4Tk020986>