From: Miroslav Lichvar Date: Wed, 12 Apr 2023 15:24:28 +0000 (+0200) Subject: test: free memory in unit tests on exit X-Git-Tag: 4.4-pre1~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a8496658a00684360e7179d607ad7be664daec2a;p=thirdparty%2Fchrony.git test: free memory in unit tests on exit --- diff --git a/test/unit/test.c b/test/unit/test.c index 94619c13..1ebb11a4 100644 --- a/test/unit/test.c +++ b/test/unit/test.c @@ -80,6 +80,7 @@ main(int argc, char **argv) test_unit(); + UTI_ResetGetRandomFunctions(); LOG_Finalise(); printf("PASS\n"); diff --git a/test/unit/util.c b/test/unit/util.c index 6fadefb7..fa294c45 100644 --- a/test/unit/util.c +++ b/test/unit/util.c @@ -755,4 +755,6 @@ test_unit(void) TEST_CHECK(words[1] == buf + 3); TEST_CHECK(strcmp(words[0], "a") == 0); TEST_CHECK(strcmp(words[1], "b") == 0); + + HSH_Finalise(); }