From d248819dfe206c115e6faf00e23bc9d71f691b2d Mon Sep 17 00:00:00 2001 From: Sergio Date: Fri, 13 Feb 2026 09:29:24 +0100 Subject: [PATCH] fix: commands list was not being freed if the command line ended in pipe error was reported but commands were being executed as the list was not being freed --- src/parser/parser.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/parser/parser.c b/src/parser/parser.c index 15b4932..f8f73ab 100644 --- a/src/parser/parser.c +++ b/src/parser/parser.c @@ -6,7 +6,7 @@ /* By: sede-san next == NULL) - syntax_error_unexpected_token((t_token *)current_token->content); + { + ft_lstclear(&commands, (void (*)(void *))command_clear); + return (syntax_error_unexpected_token((t_token *)current_token->content), NULL); + } current_token = current_token->next; } }