]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: process: Clean automatic NUMA/cpu pinning information on shutdown
authorPeter Krempa <pkrempa@redhat.com>
Tue, 25 Apr 2017 13:17:34 +0000 (15:17 +0200)
committerCole Robinson <crobinso@redhat.com>
Wed, 10 May 2017 22:02:39 +0000 (18:02 -0400)
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.

(cherry picked from commit 1730cdc665a499afc28683a4ce21493f967411b7)

src/qemu/qemu_process.c

index 0b9b4f76af8f25f2d6b788a24e7068c0620c8c8b..b06b1188bf45af940822c7a648fc07279cb2d498 100644 (file)
@@ -6431,6 +6431,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);