[libreoffice] fix another leak on scaling metric items

Caolán McNamara caolanm at fedoraproject.org
Fri May 16 20:01:36 UTC 2014


commit 91ec093c5f188f101c4b0e4e19dc6a5bf43e4fc0
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri May 16 21:01:30 2014 +0100

    fix another leak on scaling metric items

 0001-strangely-obvious-leaky-code.patch |   25 +++++++++++++++++++++++++
 libreoffice.spec                        |    2 ++
 2 files changed, 27 insertions(+), 0 deletions(-)
---
diff --git a/0001-strangely-obvious-leaky-code.patch b/0001-strangely-obvious-leaky-code.patch
new file mode 100644
index 0000000..80e3f5f
--- /dev/null
+++ b/0001-strangely-obvious-leaky-code.patch
@@ -0,0 +1,25 @@
+From 5dc66e7a9a86b40f4209eba08aad6cc9294e8845 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm at redhat.com>
+Date: Fri, 16 May 2014 20:50:24 +0100
+Subject: [PATCH] strangely obvious leaky code
+
+Change-Id: I968cbb784d53e0cff0649061c58f752939226a09
+---
+ svx/source/sdr/properties/itemsettools.cxx | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/svx/source/sdr/properties/itemsettools.cxx b/svx/source/sdr/properties/itemsettools.cxx
+index ce937b3..2879b48 100644
+--- a/svx/source/sdr/properties/itemsettools.cxx
++++ b/svx/source/sdr/properties/itemsettools.cxx
+@@ -120,6 +120,7 @@ namespace sdr
+                         SfxPoolItem* pNewItem = pItem->Clone();
+                         pNewItem->ScaleMetrics(nMul, nDiv);
+                         rSet.Put(*pNewItem);
++                        delete pNewItem;
+                     }
+                 }
+                 nWhich = aIter.NextWhich();
+-- 
+1.9.0
+
diff --git a/libreoffice.spec b/libreoffice.spec
index c9c84f0..e0539a2 100644
--- a/libreoffice.spec
+++ b/libreoffice.spec
@@ -311,6 +311,7 @@ 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
 Patch55: 0002-coverity-SfxBaseModel-s-pImpl-of-fallback-TargetDocu.patch
+Patch56: 0001-strangely-obvious-leaky-code.patch
 
 %define instdir %{_libdir}
 %define baseinstdir %{instdir}/libreoffice
@@ -2278,6 +2279,7 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
 - render smart-art with a vector format so it can be scaled nicely
 - fix leak on pasting metafiles into office
 - fix leak on pasting draw items into office
+- fix another leak on scaling metric items
 
 * 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