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
This commit is contained in:
Bjoern A. Zeeb 2015-09-27 12:17:03 +00:00
parent 27aa47691e
commit 23d56b1e9c

View File

@ -1457,7 +1457,7 @@ xge_ioctl_stats(xge_lldev_t *lldev, struct ifreq *ifreqp)
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;