Boost C++ Libraries: Ticket #10753: interprocess::winapi::c_heap_deleter::realloc_mem leaks memory https://svn.boost.org/trac10/ticket/10753 <p> Hi, </p> <p> We believe that there is a memory leak in boost::interprocess::winapi::c_heap_deleter::realloc_mem </p> <p> boost/interprocess/detail/win32_api.hpp:1790-1797 </p> <pre class="wiki">void realloc_mem(std::size_t num_bytes) { void *buf = ::realloc(m_buf, num_bytes); if(!buf){ free(m_buf); m_buf = 0; } } </pre><p> should probably be </p> <pre class="wiki">void realloc_mem(std::size_t num_bytes) { void *buf = ::realloc(m_buf, num_bytes); if(!buf){ free(m_buf); m_buf = 0; } else { m_buf = buf; } } </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/10753 Trac 1.4.3