conf: Need to unlock pools on object allocation failure
The RW pool could be left locked if allocation fails.
This commit is contained in:
parent
b527589d1f
commit
c00643f86f
@ -748,7 +748,7 @@ virStoragePoolObjAssignDef(virStoragePoolObjListPtr pools,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!(obj = virStoragePoolObjNew()))
|
if (!(obj = virStoragePoolObjNew()))
|
||||||
return NULL;
|
goto error;
|
||||||
|
|
||||||
virUUIDFormat(def->uuid, uuidstr);
|
virUUIDFormat(def->uuid, uuidstr);
|
||||||
if (virHashAddEntry(pools->objs, uuidstr, obj) < 0)
|
if (virHashAddEntry(pools->objs, uuidstr, obj) < 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user