diff --git a/src/storage_driver.c b/src/storage_driver.c index c27534c986..e9ecb20413 100644 --- a/src/storage_driver.c +++ b/src/storage_driver.c @@ -1327,9 +1327,11 @@ storageVolumeCreateXMLFrom(virStoragePoolPtr obj, storageDriverLock(driver); pool = virStoragePoolObjFindByUUID(&driver->pools, obj->uuid); - if (diffpool) + if (diffpool) { + virStoragePoolObjUnlock(pool); origpool = virStoragePoolObjFindByName(&driver->pools, vobj->pool); - else + virStoragePoolObjLock(pool); + } else origpool = pool; storageDriverUnlock(driver);