[Libreoffice-commits] core.git: xmlscript/source

Caolán McNamara caolanm at redhat.com
Fri Sep 15 16:13:45 UTC 2017


 xmlscript/source/xml_helper/xml_impctx.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit 61037c622b13122de578f5ef60a3b343af3f9633
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Sep 15 11:13:23 2017 +0100

    ofz: leak of prefixes in skipped elements
    
    Change-Id: I8e83eb605bdf5991988e147cf8478e44c858a2b0
    Reviewed-on: https://gerrit.libreoffice.org/42320
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/xmlscript/source/xml_helper/xml_impctx.cxx b/xmlscript/source/xml_helper/xml_impctx.cxx
index 5c461c29a64f..0d70c782bfaa 100644
--- a/xmlscript/source/xml_helper/xml_impctx.cxx
+++ b/xmlscript/source/xml_helper/xml_impctx.cxx
@@ -545,6 +545,11 @@ void DocumentHandlerImpl::startElement(
     else
     {
         ++m_nSkipElements;
+
+        // pop prefixes
+        for (sal_Int32 nPos = elementEntry->m_prefixes.size(); nPos--;)
+            popPrefix(elementEntry->m_prefixes[nPos]);
+
         SAL_INFO("xmlscript.xmlhelper", " no context given on createChildElement() => ignoring element \"" << rQElementName << "\" ...");
     }
     }


More information about the Libreoffice-commits mailing list