starmath/source/mathmlimport.cxx | 7 +++++++ 1 file changed, 7 insertions(+)
New commits: commit caf17df4d90ba6cff80846864a5e56c93af3756b Author: Caolán McNamara <caol...@redhat.com> Date: Sat Dec 2 15:41:16 2017 +0000 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 <c...@libreoffice.org> Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> 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; } }
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits