From: Michal Privoznik Date: Thu, 29 Jul 2021 13:53:16 +0000 (+0200) Subject: testutils: Don't leak @testBitmap and @failedTests X-Git-Tag: v7.7.0-rc1~312 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=77f7067059a59a1b15e898f64944a7a06ae9f675;p=thirdparty%2Flibvirt.git testutils: Don't leak @testBitmap and @failedTests In virTestMain() the @failedTests bitmap is allocated and optionally @testBitmap too. But neither of them is freed. Fixes: 0cd5a726e365e67690a81e3ce33ecd0cb0b5178d Fixes: cebb468ef5e82b8d4253e27ef70c67812cf93c5a Signed-off-by: Michal Privoznik Reviewed-by: Ján Tomko --- diff --git a/tests/testutils.c b/tests/testutils.c index 7d87e30a5c..58d3300998 100644 --- a/tests/testutils.c +++ b/tests/testutils.c @@ -856,6 +856,9 @@ int virTestMain(int argc, fprintf(stderr, "Some tests failed. Run them using:\n"); fprintf(stderr, "VIR_TEST_DEBUG=1 VIR_TEST_RANGE=%s %s\n", failed, argv[0]); } + + virBitmapFree(testBitmap); + virBitmapFree(failedTests); virLogReset(); return ret; }