summaryrefslogtreecommitdiff
path: root/writerperfect
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2013-02-17 13:10:03 -0600
committerFridrich Štrba <fridrich.strba@bluewin.ch>2013-03-11 09:21:57 +0100
commit83277f024e88519968376d076ce328f0adfde5a3 (patch)
treee5f3c7e9c2f8f03cf0403f7ad5ead8ec63bd21b8 /writerperfect
parentb6a761a124c36ca97187c95526e7c1a1979454b5 (diff)
coverity#983356 ressource leak
Change-Id: Idcc2d548363ddab04dd8acaa1dfb854a19ca47ef Reviewed-on: https://gerrit.libreoffice.org/2200 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org> (cherry picked from commit bf46dfdb45b1d6cd99a5c729ee98df89db363225) Signed-off-by: Fridrich Štrba <fridrich.strba@bluewin.ch>
Diffstat (limited to 'writerperfect')
-rw-r--r--writerperfect/source/filter/OdgGenerator.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/writerperfect/source/filter/OdgGenerator.cxx b/writerperfect/source/filter/OdgGenerator.cxx
index 1caebdd084df..d166a09bbda5 100644
--- a/writerperfect/source/filter/OdgGenerator.cxx
+++ b/writerperfect/source/filter/OdgGenerator.cxx
@@ -1328,7 +1328,13 @@ void OdgGeneratorPrivate::_writeGraphicsStyle()
mGraphicsGradientStyles.push_back(new TagCloseElement("draw:opacity"));
}
}
-
+ else
+ {
+ /* if mxGradient.count() == 1 for some reason we would leak
+ * pDrawGradientElement
+ */
+ delete pDrawGradientElement;
+ }
if(!bUseOpacityGradient)
delete pDrawOpacityElement;
}