mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-14 22:51:50 +03:00
Merge pull request #60 from telemenar/dev
Fix a crashing case where arena_chunk_init_hard returns NULL.
This commit is contained in:
commit
67fd1e0700
1 changed files with 4 additions and 1 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue