frees the memory of the node’s content using the function ’del’ given as a parameter and
free the node. // using free duh! del is used to free the content, not the node; the node was obviously allocated w/malloc via ft_lstnew and should therefore be deallocated using free, not del; consequently, del being NULL has no effect whatsoever on ft_lstdelone's ability to free the node itself…
Thus (a working) ft_lstdelone(node, NULL) already freed the node.
ft_lstdelone
Takes as a parameter a node and
frees the memory of the node’s content using the function ’del’ given as a parameter and
free the node. // using free duh! del is used to free the content, not the node; the node was obviously allocated w/malloc via ft_lstnew and should therefore be deallocated using free, not del; consequently, del being NULL has no effect whatsoever on ft_lstdelone's ability to free the node itself…
Thus (a working) ft_lstdelone(node, NULL) already freed the node.