diff options
Diffstat (limited to 'src/e_externs_next.c')
-rw-r--r-- | src/e_externs_next.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/e_externs_next.c b/src/e_externs_next.c index bbd9d81..5d7deaf 100644 --- a/src/e_externs_next.c +++ b/src/e_externs_next.c @@ -32,9 +32,7 @@ static char if (!(fullpath = (char*)malloc((path_len + name_len + 2) * sizeof(char)))) { - lcom_clear(&msh->curr); - s_destroy(msh); - f_fail_alloc(msh); + f_alloc_and_destroy_msh(msh); } (void)ft_memcpy(fullpath, p_path, path_len); *(fullpath + (path_len)) = '/'; @@ -96,9 +94,7 @@ char { if (!(envpath = ft_split(envline, ':'))) { - lcom_clear(&msh->curr); - s_destroy(msh); - f_fail_alloc(msh); + f_alloc_and_destroy_msh(msh); } return (envpath); } |