summaryrefslogtreecommitdiffstats
path: root/src/s_com.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-10-22 19:58:27 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-10-22 19:58:27 +0200
commitf498fb6dbbeab4b2993b834a6abd41ba8c2ed316 (patch)
tree996160c574ef2efb0145fc9cf007404facf3977a /src/s_com.c
parentUnfinished (diff)
download42-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 '')
-rw-r--r--src/s_com.c4
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);