mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-05-02 10:07:51 +03:00
Fix OOM cleanup in huge_palloc().
Fix OOM cleanup in huge_palloc() to call idalloct() rather than base_node_dalloc(). This bug is a result of incomplete refactoring, and has no impact other than leaking memory during OOM.
This commit is contained in:
parent
f79e01f75b
commit
1036ddbf11
1 changed files with 2 additions and 6 deletions
|
|
@ -48,12 +48,8 @@ huge_palloc(tsd_t *tsd, arena_t *arena, size_t usize, size_t alignment,
|
|||
*/
|
||||
is_zeroed = zero;
|
||||
arena = arena_choose(tsd, arena);
|
||||
if (unlikely(arena == NULL)) {
|
||||
base_node_dalloc(node);
|
||||
return (NULL);
|
||||
}
|
||||
ret = arena_chunk_alloc_huge(arena, usize, alignment, &is_zeroed);
|
||||
if (ret == NULL) {
|
||||
if (unlikely(arena == NULL) || (ret = arena_chunk_alloc_huge(arena,
|
||||
usize, alignment, &is_zeroed)) == NULL) {
|
||||
idalloct(tsd, node, try_tcache);
|
||||
return (NULL);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue