]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
conf: Need to unlock pools on object allocation failure
authorJohn Ferlan <jferlan@redhat.com>
Sun, 17 Dec 2017 17:41:03 +0000 (12:41 -0500)
committerJohn Ferlan <jferlan@redhat.com>
Thu, 4 Jan 2018 15:54:08 +0000 (10:54 -0500)
The RW pool could be left locked if allocation fails.

src/conf/virstorageobj.c

index 49fe24b28c7d1705091493be4fb47c019c3b0de7..19903b6c5149641c57334738627f75702ee80957 100644 (file)
@@ -748,7 +748,7 @@ virStoragePoolObjAssignDef(virStoragePoolObjListPtr pools,
     }
 
     if (!(obj = virStoragePoolObjNew()))
-        return NULL;
+        goto error;
 
     virUUIDFormat(def->uuid, uuidstr);
     if (virHashAddEntry(pools->objs, uuidstr, obj) < 0)