diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c index c8f259e317348284d2b0c1556d362dc875c5dd64..ed5395be9cbc68634f92510bce6c9863810c25a3 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; }