summaryrefslogtreecommitdiffstats
path: root/src/s_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/s_init.c')
-rw-r--r--src/s_init.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/s_init.c b/src/s_init.c
index a13f9f1..7e1c4e5 100644
--- a/src/s_init.c
+++ b/src/s_init.c
@@ -128,7 +128,11 @@ t_msh *s_init_msh(int argc, char *const argv[], char *const envp[])
}
msh->env_fork_tmp[0][0] = '\0';
if (s_inc_shlvl(msh) == 1)
+ {
+ ft_memdel((void*)&msh->cwd);
+ ft_memdel((void*)&msh);
return (NULL);
+ }
s_init_sqb_ref_one(msh);
s_init_sqb_ref_two(msh);
s_init_sqb_ref_thr(msh);