diff options
Diffstat (limited to 'libc/stdlib/malloc-simple/alloc.c')
-rw-r--r-- | libc/stdlib/malloc-simple/alloc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libc/stdlib/malloc-simple/alloc.c b/libc/stdlib/malloc-simple/alloc.c index 0b842076d..321f31932 100644 --- a/libc/stdlib/malloc-simple/alloc.c +++ b/libc/stdlib/malloc-simple/alloc.c @@ -32,7 +32,8 @@ void *malloc(size_t size) size++; #else /* Some programs will call malloc (0). Lets be strict and return NULL */ - return 0; + __set_errno(ENOMEM); + return NULL; #endif } |