mirror of https://gitee.com/openkylin/libvirt.git
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:
parent
89622ebfad
commit
727238de25
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue