[Boost-bugs] [Boost C++ Libraries] #9033: Resource Leak in boost::filesystem in operation.cpp at resize_file_api() (Windows)

Subject: [Boost-bugs] [Boost C++ Libraries] #9033: Resource Leak in boost::filesystem in operation.cpp at resize_file_api() (Windows)
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-08-22 10:48:48


#9033: Resource Leak in boost::filesystem in operation.cpp at resize_file_api()
(Windows)
------------------------------+------------------------
 Reporter: anonymous | Owner: bemandawes
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: filesystem
  Version: Boost 1.54.0 | Severity: Problem
 Keywords: |
------------------------------+------------------------
 The function resize_file_api() in operations.cpp can lead to a resource
 leak. The responsible part of code is the following:

 {{{
 return handle != INVALID_HANDLE_VALUE
       && ::SetFilePointerEx(handle, sz, 0, FILE_BEGIN)
       && ::SetEndOfFile(handle)
       && ::CloseHandle(handle);
 }}}

 If SetFilePointerEx() or SetEndOfFile() fail, the handle will not be
 closed.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9033>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:13 UTC