Boost C++ Libraries: Ticket #5734: possible handle leak in posix implementation copy_file_api https://svn.boost.org/trac10/ticket/5734 <p> There is possible handle leak in POSIX implementation of function <strong>copy_file_api</strong>. </p> <pre class="wiki">... if ((infile = ::open(from_p.c_str(), O_RDONLY))&lt; 0) { return false; } struct stat from_stat; if (::stat(from_p.c_str(), &amp;from_stat)!= 0) { return false; } ... </pre><p> if <strong>::stat</strong> failed, then function exits without closing <strong>infile</strong> handle. </p> <p> This problem exists both in <strong>v3</strong> and <strong>v2</strong> implementations of filesystem. Also this problem exists in previous releases. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5734 Trac 1.4.3 Beman Dawes Tue, 26 Jul 2011 14:49:21 GMT status changed https://svn.boost.org/trac10/ticket/5734#comment:1 https://svn.boost.org/trac10/ticket/5734#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> Ticket