diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-12-02 15:41:16 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-12-02 21:15:44 +0100 |
commit | caf17df4d90ba6cff80846864a5e56c93af3756b (patch) | |
tree | 3f22000981b8ed36d4ab5aa64f1829a1c6a67086 /starmath | |
parent | fc672573ce37f7845cb3121b2203caeaf0199669 (diff) |
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.cxx | 7 |
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; } } |