Kaydet (Commit) 6b28f7d3 authored tarafından Markus Mohrhard's avatar Markus Mohrhard

Lsan: fix memory leak in conditio.cxx

My test file leaks 9MB during import with that.

Change-Id: Ie7aba31878721ad8caef1e301a6b54a42a8c0c54
üst 79a4d09a
...@@ -336,6 +336,7 @@ void ScConditionEntry::Compile( const OUString& rExpr1, const OUString& rExpr2, ...@@ -336,6 +336,7 @@ void ScConditionEntry::Compile( const OUString& rExpr1, const OUString& rExpr2,
if ( !rExpr1.isEmpty() ) if ( !rExpr1.isEmpty() )
{ {
delete pFormula1;
aComp.SetGrammar( eGrammar1 ); aComp.SetGrammar( eGrammar1 );
if ( mpDoc->IsImportingXML() && !bTextToReal ) if ( mpDoc->IsImportingXML() && !bTextToReal )
{ {
...@@ -373,6 +374,7 @@ void ScConditionEntry::Compile( const OUString& rExpr1, const OUString& rExpr2, ...@@ -373,6 +374,7 @@ void ScConditionEntry::Compile( const OUString& rExpr1, const OUString& rExpr2,
if ( !rExpr2.isEmpty() ) if ( !rExpr2.isEmpty() )
{ {
delete pFormula2;
aComp.SetGrammar( eGrammar2 ); aComp.SetGrammar( eGrammar2 );
if ( mpDoc->IsImportingXML() && !bTextToReal ) if ( mpDoc->IsImportingXML() && !bTextToReal )
{ {
......
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