Description: remove harmful calls to xml{Init,Cleanup}Parser Do not call xmlCleanupParser() ever to prevent TLS data corruption. And it seems that xmlInitParser() is not needed either, as libxml2 calls it itself when it's needed. Origin: vendor, https://bugzilla.redhat.com/show_bug.cgi?id=554899#c12 Bug: http://bugzilla.abisource.com/show_bug.cgi?id=12670 Bug-Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=554899 Bug-Ubuntu: https://launchpad.net/bugs/519541 Author: Michal Schmidt Applied-Upstream: 2.8.3, commit:SVN r28765 Last-Update: 2010-05-17 Index: src/af/util/xp/ut_xml_libxml2.cpp =================================================================== --- src/af/util/xp/ut_xml_libxml2.cpp (revision 28752) +++ src/af/util/xp/ut_xml_libxml2.cpp (working copy) @@ -298,18 +298,3 @@ return ret; } - -// guardian because (afaik) xmlParserXXX aren't guaranteed to be idempotent -static volatile int iLibXml2Guardian = 0; - -void UT_XML::_init() -{ - if(++iLibXml2Guardian == 1) - xmlInitParser(); -} - -void UT_XML::_cleanup() -{ - if(--iLibXml2Guardian == 0) - xmlCleanupParser(); -} Index: src/af/util/xp/ut_xml.h =================================================================== --- src/af/util/xp/ut_xml.h (revision 28752) +++ src/af/util/xp/ut_xml.h (working copy) @@ -68,9 +68,6 @@ bool grow (char *& buffer, UT_uint32 & length, UT_uint32 & max, UT_uint32 require); - void _init(); - void _cleanup(); - protected: bool reset_all (); private: Index: src/af/util/xp/ut_xml.cpp =================================================================== --- src/af/util/xp/ut_xml.cpp (revision 28752) +++ src/af/util/xp/ut_xml.cpp (working copy) @@ -115,13 +115,10 @@ m_pExpertListener(0), m_pReader(0) { - _init(); } UT_XML::~UT_XML () { - _cleanup(); - if (m_chardata_buffer) g_free (m_chardata_buffer); FREEP (m_namespace);