sax/source/fastparser/fastparser.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
New commits: commit 4130f3bcaf6cc8778fcb921caa5357d9c945e353 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Aug 13 14:06:41 2018 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Aug 13 16:56:45 2018 +0200 ofz#9591 Indirect-leak ==18428== 12,809 (176 direct, 12,633 indirect) bytes in 1 blocks are definitely lost in loss record 2,664 of 2,683 ==18428== at 0x4C2EBAB: malloc (vg_replace_malloc.c:299) ==18428== by 0x8D1CBC8: xmlNewDoc (tree.c:1171) ==18428== by 0x8D0C43D: xmlParseEntityDecl (parser.c:5521) ==18428== by 0x8D0F017: xmlParseMarkupDecl (parser.c:6802) ==18428== by 0x8D11588: xmlParseInternalSubset (parser.c:8305) ==18428== by 0x8D1733A: xmlParseTryOrFinish (parser.c:11977) ==18428== by 0x8D17DDA: xmlParseChunk (parser.c:12263) ==18428== by 0x3060C380: sax_fastparser::FastSaxParserImpl::parse() (fastparser.cxx:1041) ==18428== by 0x3060B6DC: sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) (fastparser.cxx:850) ==18428== by 0x3060E675: sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) (fastparser.cxx:1357) ==18428== by 0x2F4B2ABE: SvXMLImport::parseStream(com::sun::star::xml::sax::InputSource const&) (xmlimp.cxx:485) ==18428== by 0x34E2C12C: filter::odfflatxml::OdfFlatXml::importer(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::xml::sax::XDocumentHandler> const&, com::sun::star::uno::Sequence<rtl::OUString> const&) (OdfFlatXml.cxx:150) Change-Id: I63885b837e7311330255457da3a368bd3f4f8921 Reviewed-on: https://gerrit.libreoffice.org/58933 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/sax/source/fastparser/fastparser.cxx b/sax/source/fastparser/fastparser.cxx index 3486dcd53759..a2b1e38b79fb 100644 --- a/sax/source/fastparser/fastparser.cxx +++ b/sax/source/fastparser/fastparser.cxx @@ -752,8 +752,12 @@ namespace } ~ParserCleanup() { - //xmlFreeParserCtxt accepts a null arg - xmlFreeParserCtxt(m_rEntity.mpParser); + if (m_rEntity.mpParser) + { + if (m_rEntity.mpParser->myDoc) + xmlFreeDoc(m_rEntity.mpParser->myDoc); + xmlFreeParserCtxt(m_rEntity.mpParser); + } m_rParser.popEntity(); } }; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits