You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Vemund Handeland (JIRA)" <xe...@xml.apache.org> on 2014/01/10 14:47:53 UTC
[jira] [Commented] (XERCESC-2024) LocalFileFormatTarget leaks file
handle
[ https://issues.apache.org/jira/browse/XERCESC-2024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13867800#comment-13867800 ]
Vemund Handeland commented on XERCESC-2024:
-------------------------------------------
Sorry for the delay.
The fix is OK as long as XMLPlatformUtils::closeFile does not throw. If it throws, the code has a memory leak (fDataBuf).
Tested on Windows and verified that it also works in cases where the connection to the source is lost (removable drive or network share). Would expect this to be the case on other platforms as well, but I should be verified.
> LocalFileFormatTarget leaks file handle
> ---------------------------------------
>
> Key: XERCESC-2024
> URL: https://issues.apache.org/jira/browse/XERCESC-2024
> Project: Xerces-C++
> Issue Type: Bug
> Components: Miscellaneous
> Reporter: Vemund Handeland
> Assignee: Alberto Massari
> Fix For: 3.2.0
>
> Attachments: LocalFileFormatTarget.cpp.patch
>
>
> The call to XMLPlatformUtils::writeBufferToFile in the LocalFileFormatTarget destructor might throw an exception. A typical use case is running out of disk space.
> In this case the file handle will not be closed
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)
---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org