]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
test: free memory in unit tests on exit
authorMiroslav Lichvar <mlichvar@redhat.com>
Wed, 12 Apr 2023 15:24:28 +0000 (17:24 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Thu, 13 Apr 2023 14:22:50 +0000 (16:22 +0200)
test/unit/test.c
test/unit/util.c

index 94619c13372efece857b0a9dac065935bd7dd427..1ebb11a4d0458935b76d5d07cb22f8220e265dda 100644 (file)
@@ -80,6 +80,7 @@ main(int argc, char **argv)
 
   test_unit();
 
+  UTI_ResetGetRandomFunctions();
   LOG_Finalise();
 
   printf("PASS\n");
index 6fadefb72fb09eb70e84f21b2872953c4774bbee..fa294c4528d42a64dc4b57c38e16eaf56214d4b3 100644 (file)
@@ -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();
 }