aboutsummaryrefslogtreecommitdiff
path: root/malloc/hooks.c
diff options
context:
space:
mode:
Diffstat (limited to 'malloc/hooks.c')
-rw-r--r--malloc/hooks.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/malloc/hooks.c b/malloc/hooks.c
index c91f950..8080c3f 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);