minishell/src/utils/free_minishell_line.c

24 lines
1.1 KiB
C

/* ************************************************************************** */
/* */
/* :::::::: */
/* free_minishell_line.c :+: :+: */
/* +:+ */
/* By: whaffman <whaffman@student.codam.nl> +#+ */
/* +#+ */
/* Created: 2025/02/05 16:01:44 by whaffman #+# #+# */
/* Updated: 2025/02/05 16:02:07 by whaffman ######## odam.nl */
/* */
/* ************************************************************************** */
#include "minishell.h"
void free_minishell_line(t_minishell *minishell)
{
if (minishell->line)
free(minishell->line);
if (minishell->lexer)
ft_lexer_free(minishell->lexer);
if (minishell->tokens)
ft_lstclear(&minishell->tokens, ft_clear_tokenlist);
}