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

Stephan Bergmann sbergman at redhat.com
Tue May 27 03:48:05 PDT 2014


 filter/source/graphicfilter/itiff/itiff.cxx |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

New commits:
commit a58518e35596999f03298a76b2344bbb8279ae9a
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue May 27 12:46:50 2014 +0200

    Fix (small) memory leak (as observed with CppunitTest_filter_tiff_test)
    
    Change-Id: Ib840d66882faeca01d07a8764957a1c7c4075ec0

diff --git a/filter/source/graphicfilter/itiff/itiff.cxx b/filter/source/graphicfilter/itiff/itiff.cxx
index 061592b..6ece188 100644
--- a/filter/source/graphicfilter/itiff/itiff.cxx
+++ b/filter/source/graphicfilter/itiff/itiff.cxx
@@ -1368,15 +1368,15 @@ bool TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & rGraphic )
                             aAnimation.Insert( aAnimationBitmap );
                         }
                     }
-                    // Aufraeumen:
-                    for ( i = 0; i < 4; i++ )
-                        delete[] pMap[ i ];
-
-                    delete[] pColorMap;
-                    delete[] pStripOffsets;
-                    delete[] pStripByteCounts;
                 }
             }
+
+            // Clean up:
+            for ( i = 0; i < 4; i++ )
+                delete[] pMap[ i ];
+            delete[] pColorMap;
+            delete[] pStripOffsets;
+            delete[] pStripByteCounts;
         }
     }
 


More information about the Libreoffice-commits mailing list