Opened 9 years ago
Last modified 8 years ago
#9033 new Bugs
Resource Leak in boost::filesystem in operation.cpp at resize_file_api() (Windows)
Reported by: | anonymous | Owned by: | Beman Dawes |
---|---|---|---|
Milestone: | To Be Determined | Component: | filesystem |
Version: | Boost 1.54.0 | Severity: | Problem |
Keywords: | Cc: |
Description
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.
Note:
See TracTickets
for help on using tickets.
Please check it!