-
Igor Solodovnikov authored
Memory leak was caused by Security_buffer helper class. Its free() method was implemented to set m_allocated=false after freeing context buffer. Since Security_buffer has no means to set m_allocated back to true this leads to not freeing all subsequent context buffers. Fixed by: - making Security_buffer::m_allocated const object (so it can be assigned by constructor only) - rewriting Security_buffer::free() to not alter value of Security_buffer::m_allocated - Disallow copying/assignment of Security_buffer class instances to prevent new memory leaks in the future This patch also fixes minor bugs in Map_cache class.
Igor Solodovnikov authoredMemory leak was caused by Security_buffer helper class. Its free() method was implemented to set m_allocated=false after freeing context buffer. Since Security_buffer has no means to set m_allocated back to true this leads to not freeing all subsequent context buffers. Fixed by: - making Security_buffer::m_allocated const object (so it can be assigned by constructor only) - rewriting Security_buffer::free() to not alter value of Security_buffer::m_allocated - Disallow copying/assignment of Security_buffer class instances to prevent new memory leaks in the future This patch also fixes minor bugs in Map_cache class.
Loading