Date: Tue, 29 Oct 2013 22:42:30 +0000 (UTC) From: Xin LI <delphij@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257369 - head/sys/dev/hyperv/netvsc Message-ID: <201310292242.r9TMgUQ5070064@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: delphij Date: Tue Oct 29 22:42:30 2013 New Revision: 257369 URL: http://svnweb.freebsd.org/changeset/base/257369 Log: Don't reference pointer before testing whether it is NULL. Submitted by: Clement Lecigne <clecigne google com> Reviewed by: grehan MFC after: 3 days Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Tue Oct 29 21:08:20 2013 (r257368) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Tue Oct 29 22:42:30 2013 (r257369) @@ -621,13 +621,15 @@ netvsc_recv(struct hv_device *device_ctx { 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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310292242.r9TMgUQ5070064>