]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
qemu: Unlock the NWFilter update lock by leaving via the cleanup label
authorStefan Berger <stefanb@linux.vnet.ibm.com>
Thu, 17 Apr 2014 10:30:08 +0000 (06:30 -0400)
committerStefan Berger <stefanb@us.ibm.com>
Thu, 17 Apr 2014 10:30:08 +0000 (06:30 -0400)
Fix a locking problem by leaving the function via the cleanup label.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
src/qemu/qemu_driver.c

index 454e39fb112b884df9598ce8f8447117f74f8ea8..e58fa3fe5872197eae7fcf54e19c2e1674c27769 100644 (file)
@@ -6140,7 +6140,7 @@ qemuDomainCreateWithFlags(virDomainPtr dom, unsigned int flags)
     virNWFilterReadLockFilterUpdates();
 
     if (!(vm = qemuDomObjFromDomain(dom)))
-        return -1;
+        goto cleanup;
 
     if (virDomainCreateWithFlagsEnsureACL(dom->conn, vm->def) < 0)
         goto cleanup;