diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-10-22 19:58:27 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-10-22 19:58:27 +0200 |
commit | f498fb6dbbeab4b2993b834a6abd41ba8c2ed316 (patch) | |
tree | 996160c574ef2efb0145fc9cf007404facf3977a /src/s_com.c | |
parent | Unfinished (diff) | |
download | 42-minishell-f498fb6dbbeab4b2993b834a6abd41ba8c2ed316.tar.gz 42-minishell-f498fb6dbbeab4b2993b834a6abd41ba8c2ed316.tar.bz2 42-minishell-f498fb6dbbeab4b2993b834a6abd41ba8c2ed316.tar.xz 42-minishell-f498fb6dbbeab4b2993b834a6abd41ba8c2ed316.tar.zst 42-minishell-f498fb6dbbeab4b2993b834a6abd41ba8c2ed316.zip |
On the way but norm this shit
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); |