summaryrefslogtreecommitdiffstats
path: root/libft
diff options
context:
space:
mode:
Diffstat (limited to 'libft')
-rw-r--r--libft/src/ft_nrealloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libft/src/ft_nrealloc.c b/libft/src/ft_nrealloc.c
index ea13f19..82975d1 100644
--- a/libft/src/ft_nrealloc.c
+++ b/libft/src/ft_nrealloc.c
@@ -27,12 +27,12 @@ void
}
else if (!newsize)
{
- free(ptr);
+ ft_memdel((void*)&ptr);
return (NULL);
}
if (!(nptr = malloc(newsize)))
return (ptr);
ft_memcpy(nptr, ptr, oldsize);
- free(ptr);
+ ft_memdel((void*)&ptr);
return (nptr);
}