[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - svtools/source

Caolán McNamara caolanm at redhat.com
Sat May 17 13:26:51 PDT 2014


 svtools/source/graphic/grfcache.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4eea91d7a9a90a40839925909c1173b4469e0eb4
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri May 16 16:06:10 2014 +0100

    fix memory leak on pasting metafiles into writer
    
    copying from mspaint to writer and then deleting the image in a loop will
    eventually exhaust all memory.
    
    regression since 004a29b9ac66f68af5ea12a2303a4b2be77d8145
    
    Change-Id: I381285cda3823de7df0c1725a339943caf9536fe
    (cherry picked from commit 7d6e159df4c28afde2fff5bd734ec3a8f63cb15a)
    Reviewed-on: https://gerrit.libreoffice.org/9383
    Tested-by: Michael Stahl <mstahl at redhat.com>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>

diff --git a/svtools/source/graphic/grfcache.cxx b/svtools/source/graphic/grfcache.cxx
index 966cea8..da793f3 100644
--- a/svtools/source/graphic/grfcache.cxx
+++ b/svtools/source/graphic/grfcache.cxx
@@ -366,7 +366,7 @@ void GraphicCacheEntry::GraphicObjectWasSwappedOut( const GraphicObject& /*rObj*
     if( mbSwappedAll )
     {
         delete mpBmpEx, mpBmpEx = NULL;
-        mpMtf = NULL; // No need to delete it as it has already been dereferenced
+        delete mpMtf, mpMtf = NULL;
         delete mpAnimation, mpAnimation = NULL;
 
         // #119176# also reset SvgData


More information about the Libreoffice-commits mailing list