diff options
| -rw-r--r-- | CHANGELOG.md | 1 | ||||
| -rw-r--r-- | src/zencore/iobuffer.cpp | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 35d03b8d6..b8280df13 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## - Bugfix: Cache RPC recording would drop data when it reached 4GB of inline chunk data in a segment +- Bugfix: `IoBuffer::Materialize` would leak memory for small buffers - Bugfix: Fix crash bug when trying to inspect non-open block file in GC - Bugfix: Make sure we initialize the pattern of FileSink before it is added as a usable logger - Bugfix: Fixed thread safety issues in RPC recorder v2 diff --git a/src/zencore/iobuffer.cpp b/src/zencore/iobuffer.cpp index 912f9ce4e..80d0f4ee4 100644 --- a/src/zencore/iobuffer.cpp +++ b/src/zencore/iobuffer.cpp @@ -209,6 +209,8 @@ IoBufferExtendedCore::~IoBufferExtendedCore() uint64_t MapSize = ~uint64_t(uintptr_t(m_MmapHandle)); munmap(m_MappedPointer, MapSize); #endif + + m_DataPtr = nullptr; // prevent any buffer deallocation attempts } const uint32_t LocalFlags = m_Flags.load(std::memory_order_relaxed); @@ -244,8 +246,6 @@ IoBufferExtendedCore::~IoBufferExtendedCore() ZEN_WARN("Error reported on file handle close, reason '{}'", GetLastErrorAsString()); } } - - m_DataPtr = nullptr; } static constexpr size_t MappingLockCount = 128; |