From owner-svn-src-stable@FreeBSD.ORG Fri Nov 1 17:39:59 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B0C15106; Fri, 1 Nov 2013 17:39:59 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9CAB02C94; Fri, 1 Nov 2013 17:39:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA1HdxRk081476; Fri, 1 Nov 2013 17:39:59 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA1Hdxuw081475; Fri, 1 Nov 2013 17:39:59 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201311011739.rA1Hdxuw081475@svn.freebsd.org> From: Xin LI Date: Fri, 1 Nov 2013 17:39:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r257513 - stable/10/sys/dev/hyperv/netvsc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Nov 2013 17:39:59 -0000 Author: delphij Date: Fri Nov 1 17:39:59 2013 New Revision: 257513 URL: http://svnweb.freebsd.org/changeset/base/257513 Log: MFC r257369: Don't reference pointer before testing whether it is NULL. Submitted by: Clement Lecigne Reviewed by: grehan Approved by: re (kib) Modified: stable/10/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Directory Properties: stable/10/sys/ (props changed) stable/10/sys/dev/hyperv/ (props changed) Modified: stable/10/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- stable/10/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Fri Nov 1 17:38:52 2013 (r257512) +++ stable/10/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Fri Nov 1 17:39:59 2013 (r257513) @@ -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;