summaryrefslogtreecommitdiff
path: root/libc/stdlib
diff options
context:
space:
mode:
Diffstat (limited to 'libc/stdlib')
-rw-r--r--libc/stdlib/malloc/realloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/stdlib/malloc/realloc.c b/libc/stdlib/malloc/realloc.c
index 8de00665f..8d55289c5 100644
--- a/libc/stdlib/malloc/realloc.c
+++ b/libc/stdlib/malloc/realloc.c
@@ -30,7 +30,7 @@ realloc (void *mem, size_t new_size)
if (! new_size)
{
free (mem);
- return malloc (new_size);
+ return NULL;
}
if (! mem)
return malloc (new_size);