Commit 1ae9287a authored by Jason Evans's avatar Jason Evans Committed by Christopher Ferris
Browse files

Fix potential chunk leaks.

Move chunk_dalloc_arena()'s implementation into chunk_dalloc_wrapper(),
so that if the dalloc hook fails, proper decommit/purge/retain cascading
occurs.  This fixes three potential chunk leaks on OOM paths, one during
dss-based chunk allocation, one during chunk header commit (currently
relevant only on Windows), and one during rtree write (e.g. if rtree
node allocation fails).

Merge chunk_purge_arena() into chunk_purge_default() (refactor, no
change to functionality).

Bug: 28590121

(cherry picked from commit 8d8960f6)

Change-Id: I70758757b3342e0623918bb56c602873a367a192
parent 1e14731d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment