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(a)virtuozzo.com>
---
src/vz/vz_driver.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c
index 545dc79..de06443 100644
--- a/src/vz/vz_driver.c
+++ b/src/vz/vz_driver.c
@@ -794,12 +794,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;
}
--
1.8.3.1