From 253989ccc96290253d493f37440b7dcf6d36c984 Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Sat, 4 Feb 2023 17:41:37 +0100 Subject: [PATCH] fixed segfault by deallocating wrong pointer yes so I was deallocating node before the last node, not the last one... Ima dum --- src/core/lib/flags.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/lib/flags.c b/src/core/lib/flags.c index 366ae9a..5b340c9 100644 --- a/src/core/lib/flags.c +++ b/src/core/lib/flags.c @@ -80,7 +80,7 @@ void remove_node_from_end(void) buffer -> next = NULL; //UNLINK } - free(buffer); + free(buffer -> next); } char *get_last_node_identifier(void)