You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
libreoffice/0001-fix-memory-leak-on-pas...

32 lines
1.1 KiB

From 3617ee56f8540f225f664650882b2158e0ccdb41 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Fri, 16 May 2014 16:06:10 +0100
Subject: [PATCH 1/2] 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
---
svtools/source/graphic/grfcache.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/svtools/source/graphic/grfcache.cxx b/svtools/source/graphic/grfcache.cxx
index 26d766a..72fdc3a 100644
--- a/svtools/source/graphic/grfcache.cxx
+++ b/svtools/source/graphic/grfcache.cxx
@@ -367,7 +367,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
--
1.9.0