retrieve_path() leak fixed

This commit is contained in:
lperrey
2021-12-22 19:34:21 +01:00
parent 9bffb99b30
commit 69adb1cf2f
5 changed files with 21 additions and 13 deletions

View File

@@ -6,7 +6,7 @@
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/12/03 13:36:54 by lperrey #+# #+# */
/* Updated: 2021/12/21 22:41:14 by lperrey ### ########.fr */
/* Updated: 2021/12/22 19:23:41 by lperrey ### ########.fr */
/* */
/* ************************************************************************** */
@@ -35,7 +35,7 @@ int builtin_export(int argc, char *argv[], t_all *c)
else if (ret == ERR_ID)
exit_value = EXIT_FAILURE;
if (ft_strncmp(argv[i], "PATH=", 5) == 0)
c->path = retrieve_path();
retrieve_path(&c->path);
i++;
}
return (exit_value);