diff options
Diffstat (limited to 'src/s_com.c')
-rw-r--r-- | src/s_com.c | 4 |
1 files changed, 4 insertions, 0 deletions
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); |