From a8496658a00684360e7179d607ad7be664daec2a Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Wed, 12 Apr 2023 17:24:28 +0200 Subject: [PATCH] test: free memory in unit tests on exit --- test/unit/test.c | 1 + test/unit/util.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/test/unit/test.c b/test/unit/test.c index 94619c1..1ebb11a 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 6fadefb..fa294c4 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(); }