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:
parent
27aa47691e
commit
23d56b1e9c
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user