about summary refs log tree commit diff
path: root/src/malloc/malloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/malloc/malloc.c')
-rw-r--r--src/malloc/malloc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/malloc/malloc.c b/src/malloc/malloc.c
index fb65ab5b..d6ad9041 100644
--- a/src/malloc/malloc.c
+++ b/src/malloc/malloc.c
@@ -177,6 +177,7 @@ static struct chunk *expand_heap(size_t n)
 	return w;
 fail:
 	unlock(mal.brk_lock);
+	errno = ENOMEM;
 	return 0;
 }