summaryrefslogtreecommitdiffstats
path: root/sc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-02-17 19:06:17 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-02-17 19:09:24 +0100
commitb3652dae4b4d3f02fc0c02d9e139391ef43d7ba5 (patch)
tree6eb34589618fc125b1a664594511c44cf60c4551 /sc
parentcoverity: make clear that this is safe (diff)
downloadcore-b3652dae4b4d3f02fc0c02d9e139391ef43d7ba5.tar.gz
core-b3652dae4b4d3f02fc0c02d9e139391ef43d7ba5.zip
coverity: fix memory leak
Change-Id: I2a620971d70c021c7a31dac14ce76f3428324f26
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/colorscale.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/core/data/colorscale.cxx b/sc/source/core/data/colorscale.cxx
index 0d17fa6df187..e4183e74a332 100644
--- a/sc/source/core/data/colorscale.cxx
+++ b/sc/source/core/data/colorscale.cxx
@@ -889,8 +889,6 @@ ScIconSetInfo* ScIconSetFormat::GetIconSetInfo(const ScAddress& rAddr) const
return NULL;
}
- ScIconSetInfo* pInfo = new ScIconSetInfo;
-
// now we have for sure a value
double nVal = mpDoc->GetValue(rAddr);
@@ -919,6 +917,8 @@ ScIconSetInfo* ScIconSetFormat::GetIconSetInfo(const ScAddress& rAddr) const
if(nVal >= nValMax)
++nIndex;
+ ScIconSetInfo* pInfo = new ScIconSetInfo;
+
if(mpFormatData->mbReverse)
{
sal_Int32 nMaxIndex = mpFormatData->maEntries.size() - 1;