diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-02-16 03:28:53 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-02-16 03:37:31 +0100 |
commit | b491b5e0c0599446e3853eb0e0021d20c36e88f8 (patch) | |
tree | 33bf64253abc560e7d436ef85bc4b41a3baf080d /sc | |
parent | 608521e9070156a43b9ee1f68db46aea671f08b9 (diff) |
coverity: finally fix the memory leak correctly
Change-Id: I1cd8978eba9f42aaa3d5e53085cac23f5e6a31ef
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/documen4.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx index 9356e775ea89..6299578e27e8 100644 --- a/sc/source/core/data/documen4.cxx +++ b/sc/source/core/data/documen4.cxx @@ -185,7 +185,8 @@ void ScDocument::InsertMatrixFormula(SCCOL nCol1, SCROW nRow1, // Zelle ein eigenes Array erhaelt! aPos = ScAddress( j, k, *itr ); t->CalcRelFromAbs( aPos ); - pCell = new ScFormulaCell( this, aPos, aArr.Clone(), eGram, MM_REFERENCE ); + boost::scoped_ptr<ScTokenArray> pTokArr(aArr.Clone()); + pCell = new ScFormulaCell( this, aPos, pTokArr.get(), eGram, MM_REFERENCE ); maTabs[*itr]->PutCell(j, k, (ScBaseCell*) pCell); } } |