qemu: Reset the node-name allocator in qemuDomainObjPrivateDataClear

qemuDomainObjPrivateDataClear clears state which become invalid after VM
stopped running and the node name allocator belongs there.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Peter Krempa 2019-12-20 09:32:08 +01:00
parent bae81b8e76
commit 728b993c8a
2 changed files with 3 additions and 3 deletions

View File

@ -2236,6 +2236,9 @@ qemuDomainObjPrivateDataClear(qemuDomainObjPrivatePtr priv)
virDomainBackupDefFree(priv->backup);
priv->backup = NULL;
/* reset node name allocator */
qemuDomainStorageIdReset(priv);
}

View File

@ -7567,9 +7567,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)) {
g_autofree char *xml = qemuDomainDefFormatXML(driver, NULL, vm->def, 0);