-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_lstdelone.c
executable file
·26 lines (23 loc) · 1.12 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstdelone.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ngouy <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2014/11/11 16:15:33 by ngouy #+# #+# */
/* Updated: 2015/11/04 16:12:15 by ngouy ### ########.fr */
/* */
/* ************************************************************************** */
/*
** free memory alocated for the link pointed
*/
#include "libft.h"
void ft_lstdelone(t_list **alst, void (*del)(void *, size_t))
{
if (!del || !*alst || !alst)
return ;
del((*alst)->content, (*alst)->content_size);
free(*alst);
*alst = NULL;
}