diff --git a/src/parser/cmdlist/cmdlist.c b/src/parser/cmdlist/cmdlist.c index 9676b8c..d5efcc3 100644 --- a/src/parser/cmdlist/cmdlist.c +++ b/src/parser/cmdlist/cmdlist.c @@ -6,7 +6,7 @@ /* By: khais +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/02/24 17:49:46 by khais #+# #+# */ -/* Updated: 2025/03/19 16:43:14 by khais ### ########.fr */ +/* Updated: 2025/03/20 12:23:39 by khais ### ########.fr */ /* */ /* ************************************************************************** */ @@ -81,7 +81,7 @@ t_cmdlist *cmdlist_from_wordlist(const t_wordlist *wordlist) if (words == NULL) return (NULL); if (setup_cmdlist_builder(&builder, &words) == NULL) - return (NULL); + return (wordlist_destroy(words), NULL); while (builder.error == false && builder.current_word != NULL) { if (match_op(builder.current_word->word) == OP_INVALID)