diff options
Diffstat (limited to 'src/core/function/SecureMemoryAllocator.cpp')
-rw-r--r-- | src/core/function/SecureMemoryAllocator.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/function/SecureMemoryAllocator.cpp b/src/core/function/SecureMemoryAllocator.cpp index 47301038..22f30714 100644 --- a/src/core/function/SecureMemoryAllocator.cpp +++ b/src/core/function/SecureMemoryAllocator.cpp @@ -44,6 +44,8 @@ auto SecureMemoryAllocator::Reallocate(void* ptr, std::size_t size) -> void* { return addr; } -void SecureMemoryAllocator::Deallocate(void* p) { std::free(p); } +void SecureMemoryAllocator::Deallocate(void* p) { + if (p != nullptr) std::free(p); +} } // namespace GpgFrontend
\ No newline at end of file |