]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
testutils: Don't leak @testBitmap and @failedTests
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 29 Jul 2021 13:53:16 +0000 (15:53 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 2 Aug 2021 12:14:33 +0000 (14:14 +0200)
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 <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tests/testutils.c

index 7d87e30a5c8d9d9776d5ecdbe91b079568968fe5..58d3300998b45a8310ba8446a2db6f1f006efecd 100644 (file)
@@ -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;
 }