From: Peter Krempa Date: Tue, 25 Apr 2017 13:17:34 +0000 (+0200) Subject: qemu: process: Clean automatic NUMA/cpu pinning information on shutdown X-Git-Tag: v3.3.0-rc1~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1730cdc665a499afc28683a4ce21493f967411b7;p=thirdparty%2Flibvirt.git qemu: process: Clean automatic NUMA/cpu pinning information on shutdown Clean the stale data after shutting down the VM. Otherwise the data would be leaked on next VM start. This happens due to the fact that the private data object is not freed on destroy of the VM. --- diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 843bd4cd67..b1d300e87c 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -6437,6 +6437,12 @@ void qemuProcessStop(virQEMUDriverPtr driver, priv->qemuCaps = NULL; VIR_FREE(priv->pidfile); + /* remove automatic pinning data */ + virBitmapFree(priv->autoNodeset); + priv->autoNodeset = NULL; + virBitmapFree(priv->autoCpuset); + priv->autoCpuset = NULL; + /* The "release" hook cleans up additional resources */ if (virHookPresent(VIR_HOOK_DRIVER_QEMU)) { char *xml = qemuDomainDefFormatXML(driver, vm->def, 0);