Browse Source

fix invalid read

master
nicolas-arnaud 2 years ago
parent
commit
f177c35b51
  1. 4
      srcs/ft_print_strings.c

4
srcs/ft_print_strings.c

@ -35,11 +35,13 @@ t_dlist *get_first(void)
void clean_list(void) void clean_list(void)
{ {
t_dlist *tmp = list;
while (list) while (list)
{ {
tmp = list->previous;
free(list->content); free(list->content);
free(list); free(list);
list = list->previous; list = tmp;
} }
list = NULL; list = NULL;
} }

Loading…
Cancel
Save