diff options
Diffstat (limited to 'src/u_vars.c')
-rw-r--r-- | src/u_vars.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/u_vars.c b/src/u_vars.c index e949cc9..ebdba25 100644 --- a/src/u_vars.c +++ b/src/u_vars.c @@ -29,9 +29,7 @@ static char if (!(varval = ft_strdup(p_env))) { - lcom_clear(&msh->curr); - s_destroy(msh); - f_fail_alloc(msh); + f_alloc_and_destroy_msh(msh); } return (varval); } @@ -76,9 +74,7 @@ static char { if ((varval = ft_uitoa(msh->ret)) == NULL) { - lcom_clear(&msh->curr); - s_destroy(msh); - f_fail_alloc(msh); + f_alloc_and_destroy_msh(msh); } return (varval); } @@ -86,9 +82,7 @@ static char { if ((varval = ft_strdup(msh->shname)) == NULL) { - lcom_clear(&msh->curr); - s_destroy(msh); - f_fail_alloc(msh); + f_alloc_and_destroy_msh(msh); } return (varval); } @@ -112,9 +106,7 @@ char { if (!(varval = ft_strdup(ptr->val))) { - lcom_clear(&msh->curr); - s_destroy(msh); - f_fail_alloc(msh); + f_alloc_and_destroy_msh(msh); } return (varval); } |