mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-02 09:55:18 +00: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 */
|
||||
*netname = strdup(entry->d_name);
|
||||
ret = 0;
|
||||
if (!*netname)
|
||||
virReportOOMError();
|
||||
else
|
||||
ret = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user