diff options
Diffstat (limited to 'tests/catalog.c')
-rw-r--r-- | tests/catalog.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/catalog.c b/tests/catalog.c index 386516e..4464fbe 100644 --- a/tests/catalog.c +++ b/tests/catalog.c @@ -145,10 +145,10 @@ test_s_print_msgs(void) { rc = 0; out: - if (str) { - free(str); + if (str != NULL) { + freeit((void *)&str); } - if (file) { + if (file != NULL) { if (fclose(file)) { logerr("fclose(): %s", strerror(errno)); rc = -1; @@ -183,10 +183,10 @@ test_s(void) { rc = 0; out: - if (str) { - free(str); + if (str != NULL) { + freeit((void *)&str); } - if (file) { + if (file != NULL) { if (fclose(file)) { logerr("fclose(): %s", strerror(errno)); rc = -1; @@ -263,10 +263,10 @@ test_s_print_msg(void) { rc = 0; out: - if (str) { - free(str); + if (str != NULL) { + freeit((void *)&str); } - if (file) { + if (file != NULL) { if (fclose(file)) { logerr("fclose(): %s", strerror(errno)); rc = -1; |