mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 14:45:24 +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 */
|
||||
ifacedef->mac = strdup(udev_device_get_sysattr_value(dev, "address"));
|
||||
if (!ifacedef) {
|
||||
if (!ifacedef->mac) {
|
||||
virReportOOMError();
|
||||
goto cleanup;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user