[Libreoffice-commits] core.git: writerperfect/source

Norbert Thiebaud nthiebaud at gmail.com
Tue Feb 19 07:06:59 PST 2013


 writerperfect/source/filter/OdgGenerator.cxx |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit bf46dfdb45b1d6cd99a5c729ee98df89db363225
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Sun Feb 17 13:10:03 2013 -0600

    coverity#983356 ressource leak
    
    Change-Id: Idcc2d548363ddab04dd8acaa1dfb854a19ca47ef
    Reviewed-on: https://gerrit.libreoffice.org/2200
    Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
    Tested-by: Fridrich Strba <fridrich at documentfoundation.org>

diff --git a/writerperfect/source/filter/OdgGenerator.cxx b/writerperfect/source/filter/OdgGenerator.cxx
index 8661138..ece259a 100644
--- a/writerperfect/source/filter/OdgGenerator.cxx
+++ b/writerperfect/source/filter/OdgGenerator.cxx
@@ -1325,7 +1325,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;
     }


More information about the Libreoffice-commits mailing list