Commit 292c23ae authored by Nicolas Philipps's avatar Nicolas Philipps
Browse files

Fixed libxml call to xmlCleanupParser

According to libxml documentation, xmlCleanupParser *should only be called* when the process has finished using libxml.

see http://xmlsoft.org/html/libxml-parser.html#xmlCleanupParser

--HG--
branch : fw4spl_0.7.9
extra : source : 0682be4b6b2afc777289734c85113e686e82ce5f
parent f0b41518
......@@ -130,7 +130,6 @@ const bool Validator::validate( const boost::filesystem::path & xmlFile )
xmlDocPtr xmlDoc = xmlParseFile ( xmlFile.string().c_str () );
if (xmlDoc == NULL)
{
xmlCleanupParser ();
throw std::ios_base::failure("Unable to parse the XML file " + xmlFile.string() );
}
xmlNodePtr xmlRoot = xmlDocGetRootElement (xmlDoc);
......
......@@ -138,7 +138,6 @@ xmlDocPtr XMLParser::getXmlDocFromFile(boost::filesystem::path rootFile) throw (
#endif
if (xmlDoc == NULL)
{
xmlCleanupParser ();
throw ::fwTools::Failed("Unable to parse the XML file " + rootFile.string() );
}
......@@ -156,7 +155,6 @@ xmlDocPtr XMLParser::getXmlDocFromFile(boost::filesystem::path rootFile) throw (
chdir (workingDirectorySaved);
// memory cleanup
xmlCleanupParser();
return xmlDoc;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment