[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH] Fix leak of securityDriverNames



From: "Daniel P. Berrange" <berrange redhat com>

When shutting down, the QEMU driver forgot to free the
securityDriverNames string list

Signed-off-by: Daniel P. Berrange <berrange redhat com>
---
 src/qemu/qemu_driver.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 72907d2..b3d6199 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -1134,6 +1134,9 @@ qemuShutdown(void) {
     VIR_FREE(qemu_driver->saveImageFormat);
     VIR_FREE(qemu_driver->dumpImageFormat);
 
+    for (i = 0 ; qemu_driver->securityDriverNames[i] != NULL ; i++)
+        VIR_FREE(qemu_driver->securityDriverNames[i]);
+    VIR_FREE(qemu_driver->securityDriverNames);
     virSecurityManagerFree(qemu_driver->securityManager);
 
     ebtablesContextFree(qemu_driver->ebtables);
-- 
1.8.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]