From 5d399d69256b6442da6a2be5cc1e7415876b1913 Mon Sep 17 00:00:00 2001 From: Norihiro Kamae Date: Fri, 31 Mar 2023 12:00:50 +0900 Subject: [PATCH] Fix file pointer leak in utf8_load_text_file --- src/utf8.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utf8.c b/src/utf8.c index 7bfb51c..5d0bdb3 100644 --- a/src/utf8.c +++ b/src/utf8.c @@ -217,9 +217,9 @@ utf8_char_t* utf8_load_text_file(const char* path, size_t* size) (*size) += bytes_read; } } - - fclose(file); } + + fclose(file); } data[*size] = 0;