mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Add missing strdup return value check
Check strdup return value and fail if error Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
This commit is contained in:
parent
d09354786a
commit
7c23c34d38
@ -2018,7 +2018,10 @@ pciDeviceNetName(char *device_link_sysfs_path, char **netname)
|
|||||||
|
|
||||||
/* Assume a single directory entry */
|
/* Assume a single directory entry */
|
||||||
*netname = strdup(entry->d_name);
|
*netname = strdup(entry->d_name);
|
||||||
ret = 0;
|
if (!*netname)
|
||||||
|
virReportOOMError();
|
||||||
|
else
|
||||||
|
ret = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user