-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdelstr.c
executable file
·27 lines (24 loc) · 1.03 KB
/
delstr.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* delstr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: luperez <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2014/12/02 03:14:37 by luperez #+# #+# */
/* Updated: 2014/12/02 03:20:07 by luperez ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void delstr(t_str *str)
{
t_str *tmp;
while (str->next)
{
tmp = str->next;
free(str->str);
free(str);
str = tmp;
}
free(str);
}