diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c index 88f3809064188327eac24b9f232df1411ba797f6..3b95c704b0386a2ee0cd82401cf9015f2fc83ed2 100644 --- a/src/storage/storage_driver.c +++ b/src/storage/storage_driver.c @@ -794,6 +794,10 @@ storagePoolDestroy(virStoragePoolPtr obj) { if (pool->configFile == NULL) { virStoragePoolObjRemove(&driver->pools, pool); pool = NULL; + } else if (pool->newDef) { + virStoragePoolDefFree(pool->def); + pool->def = pool->newDef; + pool->newDef = NULL; } ret = 0; @@ -804,7 +808,6 @@ cleanup: return ret; } - static int storagePoolDelete(virStoragePoolPtr obj, unsigned int flags) {