summaryrefslogtreecommitdiffstats
path: root/starmath
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-12-02 15:41:16 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-12-02 21:15:44 +0100
commitcaf17df4d90ba6cff80846864a5e56c93af3756b (patch)
tree3f22000981b8ed36d4ab5aa64f1829a1c6a67086 /starmath
parentofz#4484 another stab at mnRangeOpPosInSymbol (diff)
downloadcore-caf17df4d90ba6cff80846864a5e56c93af3756b.tar.gz
core-caf17df4d90ba6cff80846864a5e56c93af3756b.zip
ofz: fix leak
null out the transferred one and delete the remainder Change-Id: Iacf2ab46c76234ea558588114e1bcdea370577d0 Reviewed-on: https://gerrit.libreoffice.org/45716 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'starmath')
-rw-r--r--starmath/source/mathmlimport.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx
index 04ccf8bd9e6e..6e7001214541 100644
--- a/starmath/source/mathmlimport.cxx
+++ b/starmath/source/mathmlimport.cxx
@@ -2426,7 +2426,10 @@ void SmXMLRowContext_Impl::EndElement()
{
aRelationArray2.resize(nRelArrSize);
for (int i=0;i < nRelArrSize;i++)
+ {
aRelationArray2[i] = aRelationArray[i+nLeft];
+ aRelationArray[i+nLeft] = nullptr;
+ }
}
SmToken aDummy;
@@ -2437,6 +2440,10 @@ void SmXMLRowContext_Impl::EndElement()
pSNode->SetSubNodes(pLeft,pBody,pRight);
pSNode->SetScaleMode(SmScaleMode::Height);
rNodeStack.push_front(std::move(pSNode));
+
+ for (auto a : aRelationArray)
+ delete a;
+
return;
}
}