fixed here_doc but lots of leaks

This commit is contained in:
mdev9
2024-03-25 13:03:23 +01:00
parent eb5f2bd32e
commit 1f567bd6ce
3 changed files with 18 additions and 10 deletions

View File

@ -6,7 +6,7 @@
/* By: marde-vr <marde-vr@42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/02/06 20:46:19 by tomoron #+# #+# */
/* Updated: 2024/02/21 23:12:34 by marde-vr ### ########.fr */
/* Updated: 2024/03/25 12:45:39 by marde-vr ### ########.fr */
/* */
/* ************************************************************************** */
@ -36,9 +36,16 @@ void free_cmd(t_cmd *cmd)
if (cmd)
{
if (cmd && cmd->token)
{
free(cmd->token);
cmd->token = 0;
}
if (cmd && cmd->next)
{
free_cmd(cmd->next);
cmd->next = 0;
}
free(cmd);
cmd = 0;
}
}