From: Jim Fehlig Date: Mon, 2 Mar 2015 01:33:48 +0000 (-0700) Subject: libxl: remove unneeded cleanup_unlock label X-Git-Tag: v1.2.14-rc1~263 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3b7f5895715a0f1e68f42bc78c505ff7fd7d49fd;p=thirdparty%2Flibvirt.git 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 --- diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index ce3a99bf36..88fa6ff7f9 100644 --- a/src/libxl/libxl_driver.c +++ b/src/libxl/libxl_driver.c @@ -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