From 16490a5e3d03b8fa75746c874c3c3855e6ce11b9 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Sat, 25 Apr 2020 18:19:52 +0200 Subject: k --- src/ft_p_lcom_next.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/ft_p_lcom_next.c') diff --git a/src/ft_p_lcom_next.c b/src/ft_p_lcom_next.c index 626bf50..df312bc 100644 --- a/src/ft_p_lcom_next.c +++ b/src/ft_p_lcom_next.c @@ -18,6 +18,7 @@ char **ft_subst_args(const char word[], int8_t redir) { + /* TODO: norme */ char **words; char *subst; size_t i; @@ -39,7 +40,10 @@ char if (!(subst = ft_substr(word, 0, i))) return (NULL); if (!(words = ft_split(subst, ' '))) + { + ft_memdel((void*)&subst); return (NULL); + } ft_memdel((void*)&subst); return (words); } -- cgit v1.2.3