]> 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)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 28 Apr 2017 07:26:24 +0000 (09:26 +0200)
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.

src/qemu/qemu_process.c

index 843bd4cd67e796610f17d76c69ccd5391dd85276..b1d300e87cd3ddad5523e904f8f27a5fbbe318a7 100644 (file)
@@ -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);