Date: Mon, 10 Oct 2011 18:18:40 +0000 (UTC) From: Christian Brueffer <brueffer@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r226226 - stable/8/sys/net Message-ID: <201110101818.p9AIIemj075114@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: brueffer Date: Mon Oct 10 18:18:40 2011 New Revision: 226226 URL: http://svn.freebsd.org/changeset/base/226226 Log: MFC: r198357 Check pointer for NULL before dereferencing it, not after. Modified: stable/8/sys/net/if_gif.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/net/if_gif.c ============================================================================== --- stable/8/sys/net/if_gif.c Mon Oct 10 17:53:06 2011 (r226225) +++ stable/8/sys/net/if_gif.c Mon Oct 10 18:18:40 2011 (r226226) @@ -488,7 +488,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; @@ -498,7 +498,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?201110101818.p9AIIemj075114>