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

[libvirt] [PATCH 3/3] qemu: Fix memory leak in qemuGetSchedInfo



Memory returned from virStringSplit shall be freed with
virStringFreeList rather than VIR_FREE. Introduced in commit 511e7c5b.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1316433
---
 src/qemu/qemu_driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index c1bae52..1d4b6ed 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -1433,7 +1433,7 @@ qemuGetSchedInfo(unsigned long long *cpuWait,
  cleanup:
     VIR_FREE(data);
     VIR_FREE(proc);
-    VIR_FREE(lines);
+    virStringFreeList(lines);
     return ret;
 }

-- 
2.6.2


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