[xmltooling] 39/65: SSPCPP-684 Fix leaking files.
Ferenc Wágner
wferi-guest at moszumanska.debian.org
Thu Jun 30 13:07:39 UTC 2016
This is an automated email from the git hooks/post-receive script.
wferi-guest pushed a commit to branch debian/master
in repository xmltooling.
commit 93e8237037fc10ac152b8140bb26a13337a81a85
Author: Rod Widdowson <rdw at steadingsoftware.com>
Date: Thu Jun 16 17:01:09 2016 +0100
SSPCPP-684 Fix leaking files.
https://issues.shibboleth.net/jira/browse/SSPCPP-684
We need to catch the 304 return from curl and delete the spool file.
---
xmltooling/util/ReloadableXMLFile.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/xmltooling/util/ReloadableXMLFile.cpp b/xmltooling/util/ReloadableXMLFile.cpp
index 1b005f6..7505616 100644
--- a/xmltooling/util/ReloadableXMLFile.cpp
+++ b/xmltooling/util/ReloadableXMLFile.cpp
@@ -476,6 +476,11 @@ pair<bool,DOMElement*> ReloadableXMLFile::load(bool backup, string backingFile)
remove(backingFile.c_str());
throw;
}
+ catch (long& ex) {
+ if (!backingFile.empty() && !backup)
+ remove(backingFile.c_str());
+ throw;
+ }
}
pair<bool,DOMElement*> ReloadableXMLFile::load()
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-shibboleth/xmltooling.git
More information about the Pkg-shibboleth-devel
mailing list