(realloc): Handle NULL for first parameter correctly.
This commit is contained in:
parent
7d0c582398
commit
d252c4796b
@ -111,6 +111,8 @@ void * weak_function
|
||||
realloc (void *ptr, size_t n)
|
||||
{
|
||||
void *new;
|
||||
if (ptr == NULL)
|
||||
return malloc (n);
|
||||
assert (ptr == alloc_last_block);
|
||||
alloc_ptr = alloc_last_block;
|
||||
new = malloc (n);
|
||||
|
Loading…
Reference in New Issue
Block a user