The paths have the domain ID in them. Without cleaning them, they would
contain the same ID even after multiple restarts. That could cause
various problems, e.g. with access.
Reported-by: Guido Günther <agx(a)sigxcpu.org>
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
src/qemu/qemu_process.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index e58bf16eaa78..ea8b3efe02c4 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -5837,6 +5837,9 @@ void qemuProcessStop(virQEMUDriverPtr driver,
virFileDeleteTree(priv->libDir);
virFileDeleteTree(priv->channelTargetDir);
+ VIR_FREE(priv->libDir);
+ VIR_FREE(priv->channelTargetDir);
+
ignore_value(virDomainChrDefForeach(vm->def,
false,
qemuProcessCleanupChardevDevice,
--
2.8.0