free null ptr do nothing
This commit is contained in:
parent
36cec79e81
commit
6738b0f5bb
@ -117,6 +117,9 @@ void ft_free(void *ptr)
|
|||||||
chunk_t chunk;
|
chunk_t chunk;
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
|
if (ptr == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
for (i = TINY; i <= LARGE + 1; i++)
|
for (i = TINY; i <= LARGE + 1; i++)
|
||||||
{
|
{
|
||||||
if (i > LARGE)
|
if (i > LARGE)
|
||||||
|
Loading…
Reference in New Issue
Block a user