From: John Ferlan Date: Thu, 20 Jul 2017 10:46:41 +0000 (-0400) Subject: tests: Free @fakerootdir in error path X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=f4258298d3607ea1fb2185252a32e41accc2a43b;p=libvirt.git 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 --- 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;