mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-14 23:24:23 +03:00
vz: dont remove domain from list on client object error
After domain is in the domains list let's keep it there. This is approach taken by qemu driver and vz vzDomainMigrateFinish3Params too. It quite reasonable, driver domain object is fully constructed and can be discovered by client later. Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
This commit is contained in:
parent
cfc6815568
commit
ab64ebd1b5
@ -791,12 +791,8 @@ vzDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags)
|
||||
cleanup:
|
||||
if (olddom)
|
||||
virObjectUnlock(olddom);
|
||||
if (newdom) {
|
||||
if (!retdom)
|
||||
virDomainObjListRemove(driver->domains, newdom);
|
||||
else
|
||||
virObjectUnlock(newdom);
|
||||
}
|
||||
if (newdom)
|
||||
virObjectUnlock(newdom);
|
||||
virDomainDefFree(def);
|
||||
return retdom;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user