-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_freetab.c
26 lines (23 loc) · 1.02 KB
/
ft_freetab.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_freetab.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: edelangh <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2015/01/26 15:26:29 by edelangh #+# #+# */
/* Updated: 2015/01/26 15:28:15 by edelangh ### ########.fr */
/* */
/* ************************************************************************** */
#include <stdlib.h>
int ft_freetab(char **tab)
{
int i;
if (!tab)
return (0);
i = -1;
while (tab[++i])
free(tab[i]);
free(tab);
return (0);
}