aboutsummaryrefslogtreecommitdiff
path: root/dep/jemalloc/src/arena.c
diff options
context:
space:
mode:
Diffstat (limited to 'dep/jemalloc/src/arena.c')
-rw-r--r--dep/jemalloc/src/arena.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/dep/jemalloc/src/arena.c b/dep/jemalloc/src/arena.c
index 390ab0f8230..dad707b63d0 100644
--- a/dep/jemalloc/src/arena.c
+++ b/dep/jemalloc/src/arena.c
@@ -614,8 +614,11 @@ arena_chunk_alloc(arena_t *arena)
if (arena->spare != NULL)
chunk = arena_chunk_init_spare(arena);
- else
+ else {
chunk = arena_chunk_init_hard(arena);
+ if (chunk == NULL)
+ return (NULL);
+ }
/* Insert the run into the runs_avail tree. */
arena_avail_insert(arena, chunk, map_bias, chunk_npages-map_bias,