Commit id 'aeb1078ab' added a buildPool option and failure path which
calls virStoragePoolObjRemove, which unlocks the pool, clears the 'pool'
variable, and goto cleanup. However, at cleanup virStoragePoolObjUnlock
is called without check if pool is non NULL.
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
src/storage/storage_driver.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c
index 0bb577f..81c0b8c 100644
--- a/src/storage/storage_driver.c
+++ b/src/storage/storage_driver.c
@@ -930,7 +930,8 @@ storagePoolCreate(virStoragePoolPtr obj,
cleanup:
VIR_FREE(stateFile);
- virStoragePoolObjUnlock(pool);
+ if (pool)
+ virStoragePoolObjUnlock(pool);
return ret;
}
--
2.5.0