-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_lstdelone.c
27 lines (25 loc) · 1.17 KB
/
ft_lstdelone.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstdelone.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: rdragan <[email protected] +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/11/06 10:44:10 by rdragan #+# #+# */
/* Updated: 2023/09/16 23:17:16 by rdragan ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
/*
Frees the memory of the node's content using del
and frees the node. The memory of next must not be freed.
@param lst: node
@param del: address of the function used to delete the content
*/
void ft_lstdelone(t_list *lst)
{
if (!lst)
return ;
free(lst->content);
free(lst);
}