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

ChangeLog
sntp/tests/keyFile.c

index d4b267de7d2d315422c8a582aea12c208306c985..b4a8ab7659c2485c7f1a66c94846698ad5912c05 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 1341677: Nits in sntp/tests/keyFile.c.  HStenn.
 * CID 1341678: Nits in sntp/tests/keyFile.c.  HStenn.
 * CID 1341679: Nits in sntp/tests/keyFile.c.  HStenn.
 * CID 1341680: Nits in sntp/tests/keyFile.c.  HStenn.
index c9b1ef0dfca6f81b253ced62a3f8b61aad3dab10..883658a2b8151ea0ccc9896f9671bb3627de8bef 100644 (file)
@@ -75,11 +75,14 @@ test_ReadEmptyKeyFile(void) {
 void
 test_ReadASCIIKeys(void) {
        struct key* keys = NULL;
+       const char *path = CreatePath("key-test-ascii", INPUT_DIR);
 
-       TEST_ASSERT_EQUAL(2, auth_init(CreatePath("key-test-ascii", INPUT_DIR), &keys));
-
+       TEST_ASSERT_NOT_NULL(path);
+       TEST_ASSERT_EQUAL(2, auth_init(path, &keys));
        TEST_ASSERT_NOT_NULL(keys);
 
+       free((void *)path);
+
        struct key* result = NULL;
        get_key(40, &result);
        TEST_ASSERT_NOT_NULL(result);