From: Harlan Stenn Date: Sat, 5 Dec 2015 10:27:40 +0000 (+0000) Subject: CID 1341680: Nits in sntp/tests/keyFile.c. HStenn. X-Git-Tag: NTP_4_3_87~1^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=160a7796ec0ffb801bac8cd3302c76fca4a7b029;p=thirdparty%2Fntp.git CID 1341680: Nits in sntp/tests/keyFile.c. HStenn. bk: 5662bc1cpi5BDcs2iyNGH8m6fp69WA --- diff --git a/ChangeLog b/ChangeLog index a369bacd2..3ad1e0ab5 100644 --- 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 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. * CID 1341684: Nit in tests/ntpd/t-ntp_signd.c. HStenn. diff --git a/sntp/tests/keyFile.c b/sntp/tests/keyFile.c index 240b944ac..c761057b2 100644 --- a/sntp/tests/keyFile.c +++ b/sntp/tests/keyFile.c @@ -119,10 +119,12 @@ test_ReadHexKeys(void) { void test_ReadKeyFileWithComments(void) { struct key* keys = NULL; + const char *path = CreatePath("key-test-comments", INPUT_DIR); - TEST_ASSERT_EQUAL(2, auth_init(CreatePath("key-test-comments", 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(10, &result);