]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
libxl: remove unneeded cleanup_unlock label
authorJim Fehlig <jfehlig@suse.com>
Mon, 2 Mar 2015 01:33:48 +0000 (18:33 -0700)
committerJim Fehlig <jfehlig@suse.com>
Thu, 5 Mar 2015 16:05:35 +0000 (09:05 -0700)
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>
src/libxl/libxl_driver.c

index ce3a99bf368031c32152b4aea24cf9ff9faf32bd..88fa6ff7f970b27b6ed4b6845d9e6f92cb927826 100644 (file)
@@ -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