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

[libvirt] [PATCH 2/2] tests: Free @fakerootdir in error path



Commit id 'dd9b29dad' added this new variable, but didn't free it in
one instance where status was returned to the caller.

Found by Coverity

Signed-off-by: John Ferlan <jferlan redhat com>
---
 tests/qemumemlocktest.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/qemumemlocktest.c b/tests/qemumemlocktest.c
index 268563d..66ebabb 100644
--- a/tests/qemumemlocktest.c
+++ b/tests/qemumemlocktest.c
@@ -80,8 +80,10 @@ mymain(void)
     if (!abs_top_srcdir)
         abs_top_srcdir = abs_srcdir "/..";
 
-    if (qemuTestDriverInit(&driver) < 0)
+    if (qemuTestDriverInit(&driver) < 0) {
+        VIR_FREE(fakerootdir);
         return EXIT_FAILURE;
+    }
 
     driver.privileged = true;
 
-- 
2.9.4


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