Boost C++ Libraries: Ticket #6945: Handle leak in filesystem::resize_file https://svn.boost.org/trac10/ticket/6945 <p> I have handle leak with filesystem::resize_file if not enough free disk space for resize. File stay locked after exception. </p> <p> P.S. Using filesystem3 OS: Windows 7 </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6945 Trac 1.4.3 Kaylyn Bogle <code@…> Fri, 06 Jul 2012 03:22:40 GMT <link>https://svn.boost.org/trac10/ticket/6945#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6945#comment:1</guid> <description> <p> In libs/filesystem/src/operations.cpp </p> <div class="wiki-code"><div class="code"><pre> <span class="k">return</span> <span class="n">handle</span> <span class="o">!=</span> <span class="n">INVALID_HANDLE_VALUE</span> <span class="o">&amp;&amp;</span> <span class="o">::</span><span class="n">SetFilePointerEx</span><span class="p">(</span><span class="n">handle</span><span class="p">,</span> <span class="n">sz</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="n">FILE_BEGIN</span><span class="p">)</span> <span class="o">&amp;&amp;</span> <span class="o">::</span><span class="n">SetEndOfFile</span><span class="p">(</span><span class="n">handle</span><span class="p">)</span> <span class="o">&amp;&amp;</span> <span class="o">::</span><span class="n">CloseHandle</span><span class="p">(</span><span class="n">handle</span><span class="p">);</span> </pre></div></div><p> <code>SetEndOfFile</code> is failing and short-circuiting before <code>CloseHandle</code> is called. </p> </description> <category>Ticket</category> </item> <item> <author>Kaylyn Bogle <code@…></author> <pubDate>Fri, 06 Jul 2012 03:23:23 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/6945 https://svn.boost.org/trac10/ticket/6945 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">patchfile.patch</span> </li> </ul> <p> fixes for aforementioned problem </p> Ticket anonymous Sat, 06 Dec 2014 11:25:34 GMT <link>https://svn.boost.org/trac10/ticket/6945#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6945#comment:2</guid> <description> <p> still not fixed... </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Beman Dawes</dc:creator> <pubDate>Tue, 30 Dec 2014 15:51:30 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/6945#comment:3 https://svn.boost.org/trac10/ticket/6945#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Fixed in develop by applying patch from Kaylyn Bogle. Fix should ship with 1.58.0 </p> <p> Thanks, </p> <p> --Beman </p> Ticket