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

New commits:
commit 4eea91d7a9a90a40839925909c1173b4469e0eb4
Author: Caolán McNamara <[email protected]>
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 <[email protected]>
    Reviewed-by: Michael Stahl <[email protected]>

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
_______________________________________________
Libreoffice-commits mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to