-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_free.c
38 lines (33 loc) · 1.12 KB
/
ft_free.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
28
29
30
31
32
33
34
35
36
37
38
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_free.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: yijhuang <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/03/02 22:37:43 by yijhuang #+# #+# */
/* Updated: 2019/03/02 22:41:04 by yijhuang ### ########.fr */
/* */
/* ************************************************************************** */
#include "fillit.h"
void free_two_char(char **b)
{
int i;
i = -1;
if (b && *b)
{
while (b[++i])
free(b[i]);
}
free(b);
}
void free_list(t_flist *list)
{
t_flist *tmp;
while (list)
{
tmp = list;
free(tmp);
list = list->next;
}
}