From e9014258a8c75040b10e77071d2e63677be64773 Mon Sep 17 00:00:00 2001 From: SuperNovaa41 Date: Thu, 25 Jan 2024 09:41:08 -0500 Subject: [PATCH] another potential getline bug --- src/csv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/csv.c b/src/csv.c index 0e50338..b1d9d92 100644 --- a/src/csv.c +++ b/src/csv.c @@ -91,6 +91,8 @@ void remove_line_from_file(int id_to_remove) fclose(new_csv); fclose(csv); + free(line); // man pages say this should be freed + remove(FILE_NAME); rename("temp.csv", FILE_NAME); // new csv is now the original file, without that line }