Skip to content
Browse files

MFC r257369:

Don't reference pointer before testing whether it is
NULL.

Submitted by:	Clement Lecigne <clecigne google com>
Reviewed by:	grehan
Approved by:	re (kib)
  • Loading branch information...
1 parent d1f5c9b commit 03c171750ec54c302bf622324731a2cf5c8dd63f @delphij delphij committed Nov 1, 2013
Showing with 3 additions and 1 deletion.
  1. +3 −1 sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
View
4 sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
@@ -621,13 +621,15 @@ netvsc_recv(struct hv_device *device_ctx, netvsc_packet *packet)
{
hn_softc_t *sc = (hn_softc_t *)device_get_softc(device_ctx->device);
struct mbuf *m_new;
- struct ifnet *ifp = sc->hn_ifp;
+ struct ifnet *ifp;
int size;
int i;
if (sc == NULL) {
return (0); /* TODO: KYS how can this be! */
}
+
+ ifp = sc->hn_ifp;
ifp = sc->arpcom.ac_ifp;

0 comments on commit 03c1717

Please sign in to comment.
Something went wrong with that request. Please try again.