summaryrefslogtreecommitdiffstats
path: root/src/ft_p_lcom_next.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ft_p_lcom_next.c')
-rw-r--r--src/ft_p_lcom_next.c4
1 files changed, 4 insertions, 0 deletions
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);
}