Kaydet (Commit) 404a2ff6 authored tarafından Caolán McNamara's avatar Caolán McNamara

ofz#4849 Direct leak

Change-Id: If9b7f6de42d99c76165aec775b8cde2505df0c62
Reviewed-on: https://gerrit.libreoffice.org/48561Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 652c963b
......@@ -674,14 +674,21 @@ void SwHTMLParser::Continue( HtmlTokenId nToken )
EndNumBulList();
OSL_ENSURE( !m_nContextStMin, "There are protected contexts" );
m_nContextStMin = 0;
while( m_aContexts.size() )
// try this twice, first normally to let m_nContextStMin decrease
// naturally and get contexts popped in desired order, and if that
// fails force it
for (int i = 0; i < 2; ++i)
{
std::unique_ptr<HTMLAttrContext> xCntxt(PopContext());
if (xCntxt)
while (m_aContexts.size() > m_nContextStMin)
{
EndContext(xCntxt.get());
std::unique_ptr<HTMLAttrContext> xCntxt(PopContext());
if (xCntxt)
EndContext(xCntxt.get());
}
if (!m_nContextStMin)
break;
OSL_ENSURE(!m_nContextStMin, "There are still protected contexts");
m_nContextStMin = 0;
}
if( !m_aParaAttrs.empty() )
......
Markdown is supported
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