From c334947c7ae9722a3f3eca14410e244d62d95a54 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Sun, 26 Apr 2020 18:10:47 +0200 Subject: Nice vars gathering --- libft/src/ft_nrealloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libft/src/ft_nrealloc.c') 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); } -- cgit v1.2.3