mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 07:59:00 +00: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:
parent
08ad83eee1
commit
a95b67bec3
@ -332,7 +332,7 @@ virDomainObjListAddLocked(virDomainObjListPtr doms,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!(vm = virDomainObjNew(xmlopt)))
|
if (!(vm = virDomainObjNew(xmlopt)))
|
||||||
goto cleanup;
|
goto error;
|
||||||
vm->def = def;
|
vm->def = def;
|
||||||
|
|
||||||
if (virDomainObjListAddObjLocked(doms, vm) < 0) {
|
if (virDomainObjListAddObjLocked(doms, vm) < 0) {
|
||||||
@ -340,7 +340,7 @@ virDomainObjListAddLocked(virDomainObjListPtr doms,
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cleanup:
|
|
||||||
return vm;
|
return vm;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user