diff options
author | Ulrich Drepper <drepper@redhat.com> | 2001-11-10 03:23:20 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2001-11-10 03:23:20 +0000 |
commit | d252c4796b2619b35099d829cb519844c49ee78c (patch) | |
tree | 2737a420aa7e0886568e701375ca476573e43b36 /elf/dl-minimal.c | |
parent | 7d0c5823985d8d2be48cbc23b5099633bedceef4 (diff) | |
download | glibc-d252c4796b2619b35099d829cb519844c49ee78c.tar glibc-d252c4796b2619b35099d829cb519844c49ee78c.tar.gz glibc-d252c4796b2619b35099d829cb519844c49ee78c.tar.bz2 glibc-d252c4796b2619b35099d829cb519844c49ee78c.zip |
(realloc): Handle NULL for first parameter correctly.
Diffstat (limited to 'elf/dl-minimal.c')
-rw-r--r-- | elf/dl-minimal.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/elf/dl-minimal.c b/elf/dl-minimal.c index 564da7dfcf..b72faa0aa7 100644 --- a/elf/dl-minimal.c +++ b/elf/dl-minimal.c @@ -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); |