summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-12-12 20:34:07 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-12-13 09:06:46 +0100
commitcd431435f99c5edc249e8a1aa6685b87c6265604 (patch)
tree614a2e212e3dc75e859de24a087155542121c15d
parent5f9812e65e6c3c147c8143a046f934be4433fca6 (diff)
ofz: Indirect-leak
Change-Id: Ib0ae0baad1f34a06d67391fa9957b3f822ee50e4 Reviewed-on: https://gerrit.libreoffice.org/46353 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sw/source/filter/html/swhtml.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 0f5810542878..a5dfee53c528 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -412,6 +412,14 @@ SwHTMLParser::~SwHTMLParser()
#ifdef DBG_UTIL
OSL_ENSURE( !m_nContinue, "DTOR in continue!" );
#endif
+
+ OSL_ENSURE(m_aContexts.empty(), "There are still contexts on the stack");
+ while (!m_aContexts.empty())
+ {
+ std::unique_ptr<HTMLAttrContext> xCntxt(PopContext());
+ ClearContext(xCntxt.get());
+ }
+
bool bAsync = m_xDoc->IsInLoadAsynchron();
m_xDoc->SetInLoadAsynchron( false );
m_xDoc->getIDocumentSettingAccess().set(DocumentSettingId::HTML_MODE, m_bOldIsHTMLMode);