Skip to content
  • Igor Solodovnikov's avatar
    98fd42f6
    Bug #16591288 WINAUTH PLUGIN LEAKS MEMORY AFTER EACH CONNECTION · 98fd42f6
    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.
    98fd42f6
    Bug #16591288 WINAUTH PLUGIN LEAKS MEMORY AFTER EACH CONNECTION
    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.
Loading