summaryrefslogtreecommitdiff
path: root/libc/stdlib/malloc-standard/malloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/stdlib/malloc-standard/malloc.c')
-rw-r--r--libc/stdlib/malloc-standard/malloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/stdlib/malloc-standard/malloc.c b/libc/stdlib/malloc-standard/malloc.c
index 3253ebda6..2abb5bbdd 100644
--- a/libc/stdlib/malloc-standard/malloc.c
+++ b/libc/stdlib/malloc-standard/malloc.c
@@ -744,7 +744,7 @@ static void* __malloc_alloc(size_t nb, mstate av)
}
/* catch all failure paths */
- errno = ENOMEM;
+ __set_errno(ENOMEM);
return 0;
}