aboutsummaryrefslogtreecommitdiff
path: root/ft_lstclear_bonus.c
diff options
context:
space:
mode:
Diffstat (limited to 'ft_lstclear_bonus.c')
-rw-r--r--ft_lstclear_bonus.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ft_lstclear_bonus.c b/ft_lstclear_bonus.c
index 933b6d5..f8fad93 100644
--- a/ft_lstclear_bonus.c
+++ b/ft_lstclear_bonus.c
@@ -6,7 +6,7 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/10/09 09:02:39 by cacharle #+# #+# */
-/* Updated: 2019/10/09 09:08:22 by cacharle ### ########.fr */
+/* Updated: 2019/10/09 13:30:09 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
@@ -20,8 +20,8 @@ void ft_lstclear(t_list **lst, void (*del)(void *))
while (*lst != NULL)
{
tmp = (*lst)->next;
- (*del)((*lst)->content);
- free(*lst);
+ ft_lstdelone(*lst, del);
*lst = tmp;
}
+ *lst = NULL;
}