aboutsummaryrefslogtreecommitdiff
path: root/booki.c
diff options
context:
space:
mode:
authorBen Winston2024-05-30 22:05:21 -0400
committerBen Winston2024-05-30 22:05:21 -0400
commita0bcdfb2d76c08fc816d5e7375d8d5830b630adf (patch)
tree119bb7d2ce2418f72d1b21b2d64bff4fa672ebae /booki.c
parent5cf31cbf086564fbf2f937a921c183fec77c8487 (diff)
bugfix: memory leak
Diffstat (limited to 'booki.c')
-rw-r--r--booki.c2
1 files changed, 2 insertions, 0 deletions
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);