diff options
Diffstat (limited to 'malloc/hooks.c')
-rw-r--r-- | malloc/hooks.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/malloc/hooks.c b/malloc/hooks.c index c91f9502ba..8080c3f40e 100644 --- a/malloc/hooks.c +++ b/malloc/hooks.c @@ -321,7 +321,10 @@ realloc_check (void *oldmem, size_t bytes, const void *caller) const INTERNAL_SIZE_T oldsize = chunksize (oldp); if (!checked_request2size (rb, &chnb)) - goto invert; + { + __set_errno (ENOMEM); + goto invert; + } __libc_lock_lock (main_arena.mutex); |