summaryrefslogtreecommitdiffstats
path: root/sc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-02-16 03:28:53 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-02-16 03:37:31 +0100
commitb491b5e0c0599446e3853eb0e0021d20c36e88f8 (patch)
tree33bf64253abc560e7d436ef85bc4b41a3baf080d /sc
parentcoverity: we need a virtual d'tor here (diff)
downloadcore-b491b5e0c0599446e3853eb0e0021d20c36e88f8.tar.gz
core-b491b5e0c0599446e3853eb0e0021d20c36e88f8.zip
coverity: finally fix the memory leak correctly
Change-Id: I1cd8978eba9f42aaa3d5e53085cac23f5e6a31ef
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/documen4.cxx3
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);
}
}