fix leak on pasting metafiles into office

f41
Caolán McNamara 11 years ago
parent 0142841dd6
commit 47868dd0a6

@ -0,0 +1,31 @@
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

@ -309,6 +309,7 @@ Patch50: 0001-fdo-77242-fix-crash.patch
Patch51: 0001-update-libxmlsec-config.-to-support-ppc64le.patch
Patch52: 0001-fix-for-doxygen-1.8.7.patch
Patch53: 0001-Use-SVM-metafile-instead-of-PNG-for-diagrams-SmartAr.patch
Patch54: 0001-fix-memory-leak-on-pasting-metafiles-into-writer.patch
%define instdir %{_libdir}
%define baseinstdir %{instdir}/libreoffice
@ -2274,6 +2275,7 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
%changelog
* Fri May 16 2014 Caolán McNamara <caolanm@redhat.com> - 1:4.2.4.2-14
- render smart-art with a vector format so it can be scaled nicely
- fix leak on pasting metafiles into office
* Thu May 15 2014 David Tardon <dtardon@redhat.com> - 1:4.2.4.2-13
- fix SDK doc generation with doxygen 1.8.7

Loading…
Cancel
Save