Check pointer for NULL before dereferencing it, not after.
PR: 138390 Submitted by: Patroklos Argyroudis <argp@census-labs.com> MFC after: 1 week
This commit is contained in:
parent
e6fa23b0da
commit
4382b0681e
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user