From: John Ferlan Date: Sun, 17 Dec 2017 17:41:03 +0000 (-0500) Subject: conf: Need to unlock pools on object allocation failure X-Git-Tag: v4.0.0-rc1~64 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c00643f86f8a27643a062c3c881469ff56f34f00;p=thirdparty%2Flibvirt.git conf: Need to unlock pools on object allocation failure The RW pool could be left locked if allocation fails. --- diff --git a/src/conf/virstorageobj.c b/src/conf/virstorageobj.c index 49fe24b28c..19903b6c51 100644 --- a/src/conf/virstorageobj.c +++ b/src/conf/virstorageobj.c @@ -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)