From a0bcdfb2d76c08fc816d5e7375d8d5830b630adf Mon Sep 17 00:00:00 2001 From: Ben Winston Date: Thu, 30 May 2024 22:05:21 -0400 Subject: bugfix: memory leak --- booki.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/booki.c b/booki.c index 0540f56..50e5bd6 100644 --- a/booki.c +++ b/booki.c @@ -606,9 +606,11 @@ void search(int argc, char* argv[], char* booki_file) { parse_book(cur_data, &book); print_book(book, true); write_book(book, fixed_file); + free_book(book); } fclose(fixed_file); + free(data); // copy the fixed_file to booki file bool success = copy(FIXED_FILE, booki_file); -- cgit v1.2.3