diff --git a/utils/common/poolallocator.cpp b/utils/common/poolallocator.cpp index da6f7d6c1..170eb2e56 100644 --- a/utils/common/poolallocator.cpp +++ b/utils/common/poolallocator.cpp @@ -93,7 +93,11 @@ void PoolAllocator::deallocate(void* p) OutOfBandMap::iterator it = oob.find(p); if (it == oob.end()) + { + if (useLock) + lock.store(false, std::memory_order_release); return; + } memUsage -= it->second.size; oob.erase(it);