diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/fxcrt/fx_memory.cpp | 5 | ||||
-rw-r--r-- | core/fxcrt/fx_memory.h | 6 |
2 files changed, 6 insertions, 5 deletions
diff --git a/core/fxcrt/fx_memory.cpp b/core/fxcrt/fx_memory.cpp index 6a135ae0f8..006e03031e 100644 --- a/core/fxcrt/fx_memory.cpp +++ b/core/fxcrt/fx_memory.cpp @@ -35,8 +35,9 @@ void* FXMEM_DefaultCalloc(size_t num_elems, size_t byte_size) { } void* FXMEM_DefaultRealloc(void* pointer, size_t new_size) { - return pdfium::base::PartitionReallocGeneric( - gGeneralPartitionAllocator.root(), pointer, new_size, "GeneralPartition"); + return pdfium::base::PartitionReallocGenericFlags( + gGeneralPartitionAllocator.root(), pdfium::base::PartitionAllocReturnNull, + pointer, new_size, "GeneralPartition"); } void FXMEM_DefaultFree(void* pointer) { diff --git a/core/fxcrt/fx_memory.h b/core/fxcrt/fx_memory.h index f7e6d67520..707e084211 100644 --- a/core/fxcrt/fx_memory.h +++ b/core/fxcrt/fx_memory.h @@ -57,9 +57,9 @@ inline void* FX_SafeRealloc(void* ptr, size_t num_members, size_t member_size) { if (!size.IsValid()) return nullptr; - return pdfium::base::PartitionReallocGeneric( - gGeneralPartitionAllocator.root(), ptr, size.ValueOrDie(), - "GeneralPartition"); + return pdfium::base::PartitionReallocGenericFlags( + gGeneralPartitionAllocator.root(), pdfium::base::PartitionAllocReturnNull, + ptr, size.ValueOrDie(), "GeneralPartition"); } inline void* FX_AllocOrDie(size_t num_members, size_t member_size) { |