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; } }