In the old days of a global driver lock, it was necessary to unlock
the driver after a domain restore operation. When the global lock
was removed from the driver, some remnants were left behind in
libxlDomainRestoreFlags. Remove this unneeded (and incorrect) code.
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
fd = libxlDomainSaveImageOpen(driver, cfg, from, &def, &hdr);
if (fd < 0)
- goto cleanup_unlock;
+ return -1;
if (virDomainRestoreFlagsEnsureACL(conn, def) < 0)
- goto cleanup_unlock;
+ goto cleanup;
if (!(vm = virDomainObjListAdd(driver->domains, def,
driver->xmlopt,
VIR_DOMAIN_OBJ_LIST_ADD_LIVE |
VIR_DOMAIN_OBJ_LIST_ADD_CHECK_LIVE,
NULL)))
- goto cleanup_unlock;
+ goto cleanup;
def = NULL;
virObjectUnlock(vm);
virObjectUnref(cfg);
return ret;
-
- cleanup_unlock:
- libxlDriverUnlock(driver);
- goto cleanup;
}
static int