mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 22:55:23 +00:00
interface: Need to check ifacedef->mac not just ifacedef after strdup()
This commit is contained in:
parent
761fc48136
commit
3f9d6c3566
@ -577,7 +577,7 @@ udevIfaceGetIfaceDef(struct udev *udev, char *name)
|
|||||||
|
|
||||||
/* MAC address */
|
/* MAC address */
|
||||||
ifacedef->mac = strdup(udev_device_get_sysattr_value(dev, "address"));
|
ifacedef->mac = strdup(udev_device_get_sysattr_value(dev, "address"));
|
||||||
if (!ifacedef) {
|
if (!ifacedef->mac) {
|
||||||
virReportOOMError();
|
virReportOOMError();
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user