mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
conf: duplicate interface name instead of MAC provided to lookup the interface
Introduced by 6094d6ec7f.
Found by running libvirt-perl tests.
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
@@ -182,7 +182,7 @@ virInterfaceObjListFindByMACStringCb(void *payload,
|
||||
virObjectLock(obj);
|
||||
|
||||
if (STRCASEEQ(obj->def->mac, data->matchStr)) {
|
||||
if (VIR_STRDUP(data->macs[data->nmacs], data->matchStr) < 0) {
|
||||
if (VIR_STRDUP(data->macs[data->nmacs], obj->def->name) < 0) {
|
||||
data->error = true;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user