qemuDomainObjPrivateDataClear clears state which become invalid after VM
stopped running and the node name allocator belongs there.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_domain.c | 3 +++
src/qemu/qemu_process.c | 3 ---
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index ff87720fd1..0e073c25e1 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -2238,6 +2238,9 @@ qemuDomainObjPrivateDataClear(qemuDomainObjPrivatePtr priv)
virDomainBackupDefFree(priv->backup);
priv->backup = NULL;
+
+ /* reset node name allocator */
+ qemuDomainStorageIdReset(priv);
}
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 7e1db50e8f..e6c6c0bee2 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -7672,9 +7672,6 @@ void qemuProcessStop(virQEMUDriverPtr driver,
/* clear all private data entries which are no longer needed */
qemuDomainObjPrivateDataClear(priv);
- /* reset node name allocator */
- qemuDomainStorageIdReset(priv);
-
/* The "release" hook cleans up additional resources */
if (virHookPresent(VIR_HOOK_DRIVER_QEMU)) {
char *xml = qemuDomainDefFormatXML(driver, NULL, vm->def, 0);
--
2.23.0