1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-27 07:22:07 +03:00

virDomainObjListAddLocked: Drop useless @cleanup label

It's a premature optimization. It's perfectly acceptable for
'error' label to deal with @vm == NULL case.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
This commit is contained in:
Michal Privoznik 2019-05-28 15:47:12 +02:00
parent 08ad83eee1
commit a95b67bec3

View File

@ -332,7 +332,7 @@ virDomainObjListAddLocked(virDomainObjListPtr doms,
}
if (!(vm = virDomainObjNew(xmlopt)))
goto cleanup;
goto error;
vm->def = def;
if (virDomainObjListAddObjLocked(doms, vm) < 0) {
@ -340,7 +340,7 @@ virDomainObjListAddLocked(virDomainObjListPtr doms,
goto error;
}
}
cleanup:
return vm;
error: