Patchwork [meta-xfce,1/2] gtk-xfce-engine: fix memory leak

login
register
mail settings
Submitter Andreas Müller
Date Aug. 29, 2012, 11:56 p.m.
Message ID <1346284580-16194-1-git-send-email-schnitzeltony@googlemail.com>
Download mbox | patch
Permalink /patch/35507/
State Accepted
Commit 22e1983d8ee2160235e8a6dd0a9e40275239d146
Headers show

Comments

Andreas Müller - Aug. 29, 2012, 11:56 p.m.
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
 ...-a-graduent-pattern-at-each-draw-bug-8521.patch |   30 ++++++++++++++++++++
 .../gtk-xfce-engine/gtk-xfce-engine_2.9.0.bb       |    8 +++--
 2 files changed, 35 insertions(+), 3 deletions(-)
 create mode 100644 meta-xfce/recipes-xfce/gtk-xfce-engine/files/0001-Don-t-leak-a-graduent-pattern-at-each-draw-bug-8521.patch

Patch

diff --git a/meta-xfce/recipes-xfce/gtk-xfce-engine/files/0001-Don-t-leak-a-graduent-pattern-at-each-draw-bug-8521.patch b/meta-xfce/recipes-xfce/gtk-xfce-engine/files/0001-Don-t-leak-a-graduent-pattern-at-each-draw-bug-8521.patch
new file mode 100644
index 0000000..89fddb3
--- /dev/null
+++ b/meta-xfce/recipes-xfce/gtk-xfce-engine/files/0001-Don-t-leak-a-graduent-pattern-at-each-draw-bug-8521.patch
@@ -0,0 +1,30 @@ 
+From 868e3fcbb14b836b6f5f1cc73314aebe8453a939 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
+Date: Wed, 29 Aug 2012 19:59:24 +0200
+Subject: [PATCH] Don't leak a graduent pattern at each draw (bug #8521)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upstream-Status: Backport [1]
+[1] http://git.xfce.org/xfce/gtk-xfce-engine/commit/?id=964d4a05896bcb6dfbeec34dccb77e4f381363f1
+
+Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
+---
+ src/gradient_draw.c |    2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/src/gradient_draw.c b/src/gradient_draw.c
+index 02deb88..37af559 100644
+--- a/src/gradient_draw.c
++++ b/src/gradient_draw.c
+@@ -278,4 +278,6 @@ void gradient_draw_shaded(cairo_t *cr, gint x, gint y, gint width, gint height,
+     cairo_fill (cr);
+ 
+     cairo_restore(cr);
++
++    cairo_pattern_destroy(gradient);
+ }
+-- 
+1.7.6.5
+
diff --git a/meta-xfce/recipes-xfce/gtk-xfce-engine/gtk-xfce-engine_2.9.0.bb b/meta-xfce/recipes-xfce/gtk-xfce-engine/gtk-xfce-engine_2.9.0.bb
index 0ef9d8b..9900bd6 100644
--- a/meta-xfce/recipes-xfce/gtk-xfce-engine/gtk-xfce-engine_2.9.0.bb
+++ b/meta-xfce/recipes-xfce/gtk-xfce-engine/gtk-xfce-engine_2.9.0.bb
@@ -4,13 +4,15 @@  LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
 DEPENDS = "gtk+ xfce4-dev-tools-native"
 
-PR = "r0"
+PR = "r1"
 
 inherit xfce
 
+SRC_URI += "file://0001-Don-t-leak-a-graduent-pattern-at-each-draw-bug-8521.patch"
+SRC_URI[md5sum] = "e2bc76ab5093ff8472e728e6d6ad5da2"
+SRC_URI[sha256sum] = "55604002526c800539f2a8a79e7df3bf23717f45e4bfab31c154c8d01caf3af7"
+
 FILES_${PN} += "${libdir}/gtk-2.0/*/engines \
                 ${datadir}/themes/"
 FILES_${PN}-dbg += "${libdir}/gtk-2.0/*/engines/.debug"
 
-SRC_URI[md5sum] = "e2bc76ab5093ff8472e728e6d6ad5da2"
-SRC_URI[sha256sum] = "55604002526c800539f2a8a79e7df3bf23717f45e4bfab31c154c8d01caf3af7"