From owner-svn-src-head@freebsd.org Sun Sep 27 12:17:04 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 912DEA0ACA4; Sun, 27 Sep 2015 12:17:04 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8206B259; Sun, 27 Sep 2015 12:17:04 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8RCH4jO063260; Sun, 27 Sep 2015 12:17:04 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8RCH4Zi063259; Sun, 27 Sep 2015 12:17:04 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201509271217.t8RCH4Zi063259@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Sun, 27 Sep 2015 12:17:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288307 - head/sys/dev/nxge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Sep 2015 12:17:04 -0000 Author: bz Date: Sun Sep 27 12:17:03 2015 New Revision: 288307 URL: https://svnweb.freebsd.org/changeset/base/288307 Log: Compare the correct variable to see if memory allocation succeeded. I don't even want to know where the symbol "version" comes from. Spotted by: reading kernel compile time log MFC after: 2 weeks Modified: head/sys/dev/nxge/if_nxge.c Modified: head/sys/dev/nxge/if_nxge.c ============================================================================== --- head/sys/dev/nxge/if_nxge.c Sun Sep 27 09:15:54 2015 (r288306) +++ head/sys/dev/nxge/if_nxge.c Sun Sep 27 12:17:03 2015 (r288307) @@ -1457,7 +1457,7 @@ xge_ioctl_stats(xge_lldev_t *lldev, stru case XGE_READ_VERSION: info = xge_os_malloc(NULL, XGE_BUFFER_SIZE); - if(version != NULL) { + if(info != NULL) { strcpy(info, XGE_DRIVER_VERSION); if(copyout(info, ifreqp->ifr_data, XGE_BUFFER_SIZE) == 0) retValue = 0;