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
@ -48,12 +48,8 @@ huge_palloc(tsd_t *tsd, arena_t *arena, size_t usize, size_t alignment,
|
|||||||
*/
|
*/
|
||||||
is_zeroed = zero;
|
is_zeroed = zero;
|
||||||
arena = arena_choose(tsd, arena);
|
arena = arena_choose(tsd, arena);
|
||||||
if (unlikely(arena == NULL)) {
|
if (unlikely(arena == NULL) || (ret = arena_chunk_alloc_huge(arena,
|
||||||
base_node_dalloc(node);
|
usize, alignment, &is_zeroed)) == NULL) {
|
||||||
return (NULL);
|
|
||||||
}
|
|
||||||
ret = arena_chunk_alloc_huge(arena, usize, alignment, &is_zeroed);
|
|
||||||
if (ret == NULL) {
|
|
||||||
idalloct(tsd, node, try_tcache);
|
idalloct(tsd, node, try_tcache);
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user