]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
CID 1341679: Nits in sntp/tests/keyFile.c. HStenn.
authorHarlan Stenn <stenn@ntp.org>
Sat, 5 Dec 2015 10:31:39 +0000 (10:31 +0000)
committerHarlan Stenn <stenn@ntp.org>
Sat, 5 Dec 2015 10:31:39 +0000 (10:31 +0000)
bk: 5662bd0bhu_SJ1RIc3LHOTku5wuSEw

ChangeLog
sntp/tests/keyFile.c

index 3ad1e0ab561b57abfbf7753cbb1efa3f5f8f4d36..76d73b54e94e3704cf80c753b553bdbed94c2367 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,6 +10,7 @@
 * CID 1341536: Resource leak in tests/ntpd/t-ntp_signd.c.  HStenn.
 * CID 1341537: Resource leak in tests/ntpd/t-ntp_signd.c.  HStenn.
 * CID 1341538: Memory leak in tests/ntpd/ntp_prio_q.c:262.  HStenn.
+* CID 1341679: Nits in sntp/tests/keyFile.c.  HStenn.
 * CID 1341680: Nits in sntp/tests/keyFile.c.  HStenn.
 * CID 1341681: Nits in sntp/tests/keyFile.c.  HStenn.
 * CID 1341682: Nit in libntp/authreadkeys.c.  HStenn.
index c761057b293023813f804cdab7ab7c222d35ad0c..4b350006b7a3830f1f0579515b0bfd3a7e969c65 100644 (file)
@@ -91,10 +91,12 @@ test_ReadASCIIKeys(void) {
 void
 test_ReadHexKeys(void) {
        struct key* keys = NULL;
+       const char *path = CreatePath("key-test-hex", INPUT_DIR);
 
-       TEST_ASSERT_EQUAL(3, auth_init(CreatePath("key-test-hex", INPUT_DIR), &keys));
-
+       TEST_ASSERT_NOT_NULL(path);
+       TEST_ASSERT_EQUAL(3, auth_init(path, &keys));
        TEST_ASSERT_NOT_NULL(keys);
+       free((void *)path);
 
        struct key* result = NULL;
        get_key(10, &result);