1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-23 21:34:54 +03:00

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: 0cd5a726e3
Fixes: cebb468ef5
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Michal Privoznik 2021-07-29 15:53:16 +02:00
parent 7d661d6e20
commit 77f7067059

View File

@ -856,6 +856,9 @@ int virTestMain(int argc,
fprintf(stderr, "Some tests failed. Run them using:\n"); fprintf(stderr, "Some tests failed. Run them using:\n");
fprintf(stderr, "VIR_TEST_DEBUG=1 VIR_TEST_RANGE=%s %s\n", failed, argv[0]); fprintf(stderr, "VIR_TEST_DEBUG=1 VIR_TEST_RANGE=%s %s\n", failed, argv[0]);
} }
virBitmapFree(testBitmap);
virBitmapFree(failedTests);
virLogReset(); virLogReset();
return ret; return ret;
} }