From 0bb60bc035d22d11c490d243fa7bc0292577c371 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Wed, 22 Apr 2020 23:48:09 +0200 Subject: Gathering rdrpath successfully --- src/ft_s_lcom.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/ft_s_lcom.c') 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) -- cgit v1.2.3