[libreoffice] fix leak on pasting metafiles into office
Caolán McNamara
caolanm at fedoraproject.org
Fri May 16 19:44:16 UTC 2014
commit 47868dd0a66bbb8306430051fc8a2c6faf0d5a38
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri May 16 20:44:08 2014 +0100
fix leak on pasting metafiles into office
...ory-leak-on-pasting-metafiles-into-writer.patch | 31 ++++++++++++++++++++
libreoffice.spec | 2 +
2 files changed, 33 insertions(+), 0 deletions(-)
---
diff --git a/0001-fix-memory-leak-on-pasting-metafiles-into-writer.patch b/0001-fix-memory-leak-on-pasting-metafiles-into-writer.patch
new file mode 100644
index 0000000..f1a32da
--- /dev/null
+++ b/0001-fix-memory-leak-on-pasting-metafiles-into-writer.patch
@@ -0,0 +1,31 @@
+From 3617ee56f8540f225f664650882b2158e0ccdb41 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm at 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
+
diff --git a/libreoffice.spec b/libreoffice.spec
index 37a8743..6a60784 100644
--- a/libreoffice.spec
+++ b/libreoffice.spec
@@ -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 at 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 at redhat.com> - 1:4.2.4.2-13
- fix SDK doc generation with doxygen 1.8.7
More information about the scm-commits
mailing list