From f498fb6dbbeab4b2993b834a6abd41ba8c2ed316 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Thu, 22 Oct 2020 19:58:27 +0200 Subject: On the way but norm this shit --- src/s_com.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/s_com.c') diff --git a/src/s_com.c b/src/s_com.c index 0f69993..7ed20bc 100644 --- a/src/s_com.c +++ b/src/s_com.c @@ -99,7 +99,11 @@ static void *s_get_nword(char nword[], char word[], t_com *com, t_msh *msh) nword[0] = C_NUL; ft_strlcpy(nword, word, ARG_MAX); if (p_redirs(nword, &com, msh) != 0) + { + msh->ret = 1; + ft_memdel((void*)&com); return (NULL); + } if (msh->alias != NULL) { ret = p_subst_alias(nword, TRUE, msh); -- cgit v1.2.3