From 887f912491cdeaa1c1a8b4d13d48c46909f391b7 Mon Sep 17 00:00:00 2001 From: kaotisk Date: Sun, 14 Jul 2024 05:50:23 +0300 Subject: forgot to close file descriptor --- src/tests/test_akfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/tests/test_akfs.c b/src/tests/test_akfs.c index c1eddbc..5e2c6ad 100644 --- a/src/tests/test_akfs.c +++ b/src/tests/test_akfs.c @@ -86,7 +86,7 @@ void more_than_length() void string_is_empty() { printf("%s\t", __func__); - char queried_string[128]; + char queried_string[128] = ""; // printf("Hash given:\t%s\n", queried_string); //printf("Is a hash: %s\n", ak_fs_verify_input_is_hash(queried_string) ? "true": "false"); sha512sum resulted_hash = ak_fs_sha512sum_string_to_struct(queried_string); @@ -175,6 +175,7 @@ void hash_save_to_file() { printf("\tNO PASS :(\n"); } + fclose(fd); free(resulted_string); } -- cgit v1.2.3