From f4258298d3607ea1fb2185252a32e41accc2a43b Mon Sep 17 00:00:00 2001 From: John Ferlan Date: Thu, 20 Jul 2017 06:46:41 -0400 Subject: [PATCH] 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 --- tests/qemumemlocktest.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/qemumemlocktest.c b/tests/qemumemlocktest.c index 268563df4f..66ebabb65e 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;