Date: Sun, 27 Sep 2015 12:17:04 +0000 (UTC) From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288307 - head/sys/dev/nxge Message-ID: <201509271217.t8RCH4Zi063259@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201509271217.t8RCH4Zi063259>