diff --git a/src/agent/Core/ApplicationPool/Process.h b/src/agent/Core/ApplicationPool/Process.h index cd91f2e0e9..9f67fd638c 100644 --- a/src/agent/Core/ApplicationPool/Process.h +++ b/src/agent/Core/ApplicationPool/Process.h @@ -337,8 +337,9 @@ class Process { } void destroySelf() const { + Context *context = getContext(); this->~Process(); - LockGuard l(getContext()->memoryManagementSyncher); + LockGuard l(context->memoryManagementSyncher); getContext()->processObjectPool.free(const_cast(this)); }