mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 07:17:44 +00:00
storage: Switch to new def on pool-destroy
Currently, we share the idea of old & new def with domains. Users can *-edit an object (domain, pool) which spawns a new internal representation for them. This is referenced via {domainObj,poolObj}->newDef [compared to ->def]. However, for pool we were never overwriting def with newDef. This must be done on pool-destroy (like we do analogically in domain detroy).
This commit is contained in:
parent
85ce98250e
commit
803dc0a5ba
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user