base struct
This commit is contained in:
31
lib/libft/srcs/aloc/ft_free.c
Normal file
31
lib/libft/srcs/aloc/ft_free.c
Normal file
@@ -0,0 +1,31 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_free.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: nalebrun <nalebrun@student.s19.be> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/11/25 15:43:37 by nalebrun #+# #+# */
|
||||
/* Updated: 2024/11/27 13:34:36 by nalebrun ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "../../libft.h"
|
||||
|
||||
void ft_free(char **p)
|
||||
{
|
||||
if (p && *p)
|
||||
{
|
||||
free(*p);
|
||||
*p = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void ft_free_v(void **p)
|
||||
{
|
||||
if (p && *p)
|
||||
{
|
||||
free(*p);
|
||||
*p = NULL;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user