mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-14 08:35:15 +00:00
libxl: remove unneeded cleanup_unlock label
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>
This commit is contained in:
parent
b1d159d889
commit
3b7f589571
@ -1464,17 +1464,17 @@ libxlDomainRestoreFlags(virConnectPtr conn, const char *from,
|
||||
|
||||
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;
|
||||
|
||||
@ -1492,10 +1492,6 @@ libxlDomainRestoreFlags(virConnectPtr conn, const char *from,
|
||||
virObjectUnlock(vm);
|
||||
virObjectUnref(cfg);
|
||||
return ret;
|
||||
|
||||
cleanup_unlock:
|
||||
libxlDriverUnlock(driver);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
static int
|
||||
|
Loading…
x
Reference in New Issue
Block a user