diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-07-31 23:59:35 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-07-31 23:59:35 +0200 |
commit | 1c1901379b76e9869e3612d217c60784858c60ad (patch) | |
tree | 1250c84d95a26412532364e0d82c2bdc3c970960 | |
parent | The hell it works, now asan lol (diff) | |
download | 42-minishell-1c1901379b76e9869e3612d217c60784858c60ad.tar.gz 42-minishell-1c1901379b76e9869e3612d217c60784858c60ad.tar.bz2 42-minishell-1c1901379b76e9869e3612d217c60784858c60ad.tar.xz 42-minishell-1c1901379b76e9869e3612d217c60784858c60ad.tar.zst 42-minishell-1c1901379b76e9869e3612d217c60784858c60ad.zip |
Leak free
Diffstat (limited to '')
-rw-r--r-- | src/e_builtins.c | 2 | ||||
-rw-r--r-- | src/m_minishell.c | 1 | ||||
-rw-r--r-- | src/u_vars.c | 7 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/e_builtins.c b/src/e_builtins.c index fe4f7e1..5f53f90 100644 --- a/src/e_builtins.c +++ b/src/e_builtins.c @@ -30,6 +30,6 @@ void dup_redirs(ptr, msh); ret = msh->bu_ptr[bu_id](ptr->argv + 1, msh); - lcom_clear(&msh->curr); + /* lcom_clear(&msh->curr); */ msh->ret = ret; } diff --git a/src/m_minishell.c b/src/m_minishell.c index 9306955..b4a8876 100644 --- a/src/m_minishell.c +++ b/src/m_minishell.c @@ -47,7 +47,6 @@ int ft_memdel((void*)&str_one); ft_memdel((void*)&str_two); /* TODO: delet this */ - u_subst_var_value("$var", "value", msh); ret = m_argv(argc, argv, msh); s_destroy(msh); return (ret); diff --git a/src/u_vars.c b/src/u_vars.c index a852d6f..ebd6a03 100644 --- a/src/u_vars.c +++ b/src/u_vars.c @@ -22,7 +22,7 @@ static char *set_rva(const char varname[], - t_msh *msh) + t_msh *msh) { char *rvarname; @@ -41,8 +41,8 @@ static char static char *dup_env(char *p_env, - char *rvarname, - t_msh *msh) + char *rvarname, + t_msh *msh) { char *varval; @@ -80,6 +80,7 @@ static char } p_env += 1; } + ft_memdel((void*)&rvarname); return (NULL); } |