mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
(realloc): Handle NULL for first parameter correctly.
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user