]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
sntp/tests/keyFile.c lint
authorHarlan Stenn <stenn@ntp.org>
Sat, 5 Dec 2015 10:18:23 +0000 (10:18 +0000)
committerHarlan Stenn <stenn@ntp.org>
Sat, 5 Dec 2015 10:18:23 +0000 (10:18 +0000)
bk: 5662b9efPLcdAKcmR6BbjFAU5NhLoA

sntp/tests/keyFile.c

index 77dfee7f0215b494ed8a038d91c04f79d26b5e6e..240b944ac5b5b515b338456a94a622528583c848 100644 (file)
@@ -140,10 +140,12 @@ test_ReadKeyFileWithComments(void) {
 void
 test_ReadKeyFileWithInvalidHex(void) {
        struct key* keys = NULL;
+       const char *path = CreatePath("key-test-invalid-hex", INPUT_DIR);
 
-       TEST_ASSERT_EQUAL(1, auth_init(CreatePath("key-test-invalid-hex", INPUT_DIR), &keys));
-
+       TEST_ASSERT_NOT_NULL(path);
+       TEST_ASSERT_EQUAL(1, auth_init(path, &keys));
        TEST_ASSERT_NOT_NULL(keys);
+       free((void *)path);
 
        struct key* result = NULL;
        get_key(10, &result);