/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* command_free.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: sede-san type == TOKEN_HEREDOC && redirection->heredoc_ready && redirection->target != NULL) unlink(redirection->target); free(redirection->target); free(redirection); } void executor_cmdfree( t_command *command ) { if (command == NULL) return ; cmdfree_argv(command->argv); free(command->path); ft_lstclear(&command->redirections, (void (*)(void *))cmdfree_redirection); ft_lstclear(&command->heredocs, (void (*)(void *))cmdfree_redirection); free(command); }