| Index: base/metrics/persistent_memory_allocator.cc
|
| diff --git a/base/metrics/persistent_memory_allocator.cc b/base/metrics/persistent_memory_allocator.cc
|
| index 4e6b7ef4d2191d6c939a3aa99b0e657ee202b292..4713c336c608f4484c39ff8538c12121b207fc82 100644
|
| --- a/base/metrics/persistent_memory_allocator.cc
|
| +++ b/base/metrics/persistent_memory_allocator.cc
|
| @@ -734,10 +734,10 @@ PersistentMemoryAllocator::GetBlock(Reference ref, uint32_t type_id,
|
| uint32_t size, bool queue_ok,
|
| bool free_ok) const {
|
| // Validation of parameters.
|
| - if (ref % kAllocAlignment != 0)
|
| - return nullptr;
|
| if (ref < (queue_ok ? kReferenceQueue : sizeof(SharedMetadata)))
|
| return nullptr;
|
| + if (ref % kAllocAlignment != 0)
|
| + return nullptr;
|
| size += sizeof(BlockHeader);
|
| if (ref + size > mem_size_)
|
| return nullptr;
|
|
|