calloc fix

This commit is contained in:
David Gailleton
2025-11-12 17:23:46 +01:00
parent 187e68e1aa
commit 53b2050d11
6 changed files with 13 additions and 12 deletions

View File

@@ -6,7 +6,7 @@
/* By: dgaillet <dgaillet@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/11/09 15:22:02 by dgaillet #+# #+# */
/* Updated: 2025/11/11 16:10:09 by dgaillet ### ########lyon.fr */
/* Updated: 2025/11/12 17:07:58 by dgaillet ### ########lyon.fr */
/* */
/* ************************************************************************** */
@@ -14,7 +14,7 @@
void ft_lstdelone(t_list *lst, void (*del)(void *))
{
if (!lst)
if (!lst || !del)
return ;
del(lst->content);
free(lst);