Commit 03cfb8fd authored by Chris Palmer's avatar Chris Palmer Committed by Commit Bot

[PartitionAlloc] Fix a crash when allocation fails and PartitionAllocZeroFill is used.

Bug: 864462
TBR: ajwong,haraken
Change-Id: Ia32bd6ec4aad86c0581a0512cabeb658546d6327
Reviewed-on: https://chromium-review.googlesource.com/1214692
Commit-Queue: Chris Palmer <palmer@chromium.org>
Reviewed-by: default avatarChris Palmer <palmer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#589774}
parent c62924a2
......@@ -360,7 +360,7 @@ ALWAYS_INLINE void* PartitionAllocGenericFlags(PartitionRootGeneric* root,
// TODO(crbug.com/864462): This is suboptimal. Change `AllocFromBucket` such
// that it tells callers if the allocation was satisfied with a fresh mapping
// from the OS, so that we can skip this step and save some time.
if (zero_fill) {
if (ret && zero_fill) {
memset(ret, 0, requested_size);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment