render / rpms / libvirt

Forked from rpms/libvirt 7 months ago
Clone
6d3351
From eb52df58d1dc63812430728f173699665e936cdf Mon Sep 17 00:00:00 2001
6d3351
Message-Id: <eb52df58d1dc63812430728f173699665e936cdf@dist-git>
6d3351
From: Peter Krempa <pkrempa@redhat.com>
6d3351
Date: Tue, 23 May 2017 16:33:26 +0200
6d3351
Subject: [PATCH] qemu: process: Clear priv->namespaces on VM shutdown
6d3351
6d3351
Otherwise the private data entry would be kept across instances of the
6d3351
same VM even if it's not configured to do so.
6d3351
6d3351
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1453142
6d3351
(cherry picked from commit 5203975f37e24f7b7156f0251f19f5001a6bd6eb)
6d3351
6d3351
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
6d3351
---
6d3351
 src/qemu/qemu_process.c | 4 ++++
6d3351
 1 file changed, 4 insertions(+)
6d3351
6d3351
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
6d3351
index df5ba575a..6f0d07242 100644
6d3351
--- a/src/qemu/qemu_process.c
6d3351
+++ b/src/qemu/qemu_process.c
6d3351
@@ -6447,6 +6447,10 @@ void qemuProcessStop(virQEMUDriverPtr driver,
6d3351
     /* clean up migration data */
6d3351
     VIR_FREE(priv->migTLSAlias);
6d3351
 
6d3351
+    /* clear previously used namespaces */
6d3351
+    virBitmapFree(priv->namespaces);
6d3351
+    priv->namespaces = NULL;
6d3351
+
6d3351
     /* The "release" hook cleans up additional resources */
6d3351
     if (virHookPresent(VIR_HOOK_DRIVER_QEMU)) {
6d3351
         char *xml = qemuDomainDefFormatXML(driver, vm->def, 0);
6d3351
-- 
6d3351
2.13.0
6d3351