diff options
Diffstat (limited to '')
-rw-r--r-- | src/ft_s_lcom.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ft_s_lcom.c b/src/ft_s_lcom.c index 6661b1e..f469edb 100644 --- a/src/ft_s_lcom.c +++ b/src/ft_s_lcom.c @@ -87,6 +87,8 @@ void ft_memdel((void*)&tmp->com); if (tmp->args) ft_delwords(tmp->args); + if (tmp->redir != 0) + ft_memdel((void*)&tmp->rdrpath); ft_memdel((void*)&tmp); tmp = renext; } @@ -106,7 +108,8 @@ t_lcom link->args = NULL; link->rdrpath = NULL; /* TODO: redirections here */ - ft_get_redir(&link); + if (ft_get_redir(word, &link) != 0) + return (NULL); if (!(words = ft_split(word, ' '))) return (NULL); if (ft_fill_lcom(words, &link) < 0) |