[arch-commits] Commit in gnome-shell/trunk (3 files)

Ionut Biru ibiru at archlinux.org
Fri May 6 07:06:52 UTC 2011


    Date: Friday, May 6, 2011 @ 03:06:52
  Author: ibiru
Revision: 122711

plug some leaks

Added:
  gnome-shell/trunk/shell-xfixes-cursor_missing_free.patch
  gnome-shell/trunk/st-private_fix_memory_leak.patch
Modified:
  gnome-shell/trunk/PKGBUILD

----------------------------------------+
 PKGBUILD                               |   12 ++++++---
 shell-xfixes-cursor_missing_free.patch |   22 +++++++++++++++++
 st-private_fix_memory_leak.patch       |   40 +++++++++++++++++++++++++++++++
 3 files changed, 71 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2011-05-06 06:59:38 UTC (rev 122710)
+++ PKGBUILD	2011-05-06 07:06:52 UTC (rev 122711)
@@ -4,7 +4,7 @@
 
 pkgname=gnome-shell
 pkgver=3.0.1
-pkgrel=2
+pkgrel=3
 pkgdesc="The next generation GNOME Shell"
 arch=('i686' 'x86_64')
 url="http://live.gnome.org/GnomeShell"
@@ -19,16 +19,22 @@
 groups=(gnome)
 source=(http://ftp.gnome.org/pub/GNOME/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.bz2
         arch.patch
-        network_fixes_up_to_5090a4ccce.patch)
+        network_fixes_up_to_5090a4ccce.patch
+        shell-xfixes-cursor_missing_free.patch
+        st-private_fix_memory_leak.patch)
 sha256sums=('01f7ae942ba9687a5e67d62423843ed404d77b35f74acc212a5f391beed8e079'
             'a35d5e5f9f781728070aecae3bfe329f49dadcd50ca2984e0fbdd2219825a0db'
-            '01bf41483d5d8935ed2dd6294ee04024f2d9bcb2ef13276b07331e485965c822')
+            '01bf41483d5d8935ed2dd6294ee04024f2d9bcb2ef13276b07331e485965c822'
+            'c8b92768c869d0d77595da3466cc0dba3b6f067ea5fac048f32a918bbe98bbf6'
+            '8b80a0cec39c38a47521183a3030a782ab84bb6ea5e9cc58213589245288e718')
 
 build() {
   cd "${srcdir}/${pkgname}-${pkgver}"
 
   patch -Np1 -i "${srcdir}/arch.patch"
   patch -Np1 -i "${srcdir}/network_fixes_up_to_5090a4ccce.patch"
+  patch -Np1 -i "${srcdir}/shell-xfixes-cursor_missing_free.patch"
+  patch -Np1 -i "${srcdir}/st-private_fix_memory_leak.patch"
 
   ./configure --prefix=/usr --sysconfdir=/etc \
       --libexecdir=/usr/lib/gnome-shell \

Added: shell-xfixes-cursor_missing_free.patch
===================================================================
--- shell-xfixes-cursor_missing_free.patch	                        (rev 0)
+++ shell-xfixes-cursor_missing_free.patch	2011-05-06 07:06:52 UTC (rev 122711)
@@ -0,0 +1,22 @@
+From 88de26138a8b79d89884ff2eb6471c5a8e3b39ca Mon Sep 17 00:00:00 2001
+From: Maxim Ermilov <zaspire at rambler.ru>
+Date: Thu, 05 May 2011 10:06:05 +0000
+Subject: shell-xfixes-cursor: missing XFree
+
+memory returned by XFixesGetCursorImage should be freed after usage.
+https://bugzilla.gnome.org/show_bug.cgi?id=642652
+---
+diff --git a/src/shell-xfixes-cursor.c b/src/shell-xfixes-cursor.c
+index 14d2b59..334503d 100644
+--- a/src/shell-xfixes-cursor.c
++++ b/src/shell-xfixes-cursor.c
+@@ -254,6 +254,7 @@ xfixes_cursor_reset_image (ShellXFixesCursor *xfixes_cursor)
+       xfixes_cursor->cursor_hot_y = cursor_image->yhot;
+       g_signal_emit (xfixes_cursor, signals[CURSOR_CHANGED], 0);
+     }
++  XFree (cursor_image);
+ }
+ 
+ static void
+--
+cgit v0.9

Added: st-private_fix_memory_leak.patch
===================================================================
--- st-private_fix_memory_leak.patch	                        (rev 0)
+++ st-private_fix_memory_leak.patch	2011-05-06 07:06:52 UTC (rev 122711)
@@ -0,0 +1,40 @@
+From 72f9f482d6f1bcb53ea2bd1606818af1f33a5a8c Mon Sep 17 00:00:00 2001
+From: Colin Walters <walters at verbum.org>
+Date: Thu, 05 May 2011 19:21:58 +0000
+Subject: st-private: Fix memory leak
+
+==13810== 11,360 bytes in 1 blocks are definitely lost in loss record 18,574 of 18,765
+==13810==    at 0x4005447: calloc (vg_replace_malloc.c:467)
+==13810==    by 0x5191882: standard_calloc (gmem.c:107)
+==13810==    by 0x51920A7: g_malloc0 (gmem.c:196)
+==13810==    by 0x4056201: blur_pixels (st-private.c:466)
+==13810==    by 0x40573B4: _st_create_shadow_cairo_pattern (st-private.c:710)
+==13810==    by 0x4070746: st_theme_node_paint (st-theme-node-drawing.c:856)
+==13810==    by 0x3FEFFFFF: ???
+
+https://bugzilla.gnome.org/show_bug.cgi?id=649497
+---
+diff --git a/src/st/st-private.c b/src/st/st-private.c
+index d0aa89b..51798a1 100644
+--- a/src/st/st-private.c
++++ b/src/st/st-private.c
+@@ -746,7 +746,7 @@ _st_create_shadow_cairo_pattern (StShadow        *shadow_spec,
+                               (height_out - height_in) / 2.0);
+       cairo_pattern_set_matrix (dst_pattern, &shadow_matrix);
+ 
+-      return dst_pattern;
++      goto out;
+     }
+ 
+   /* Read all the code from the cairo_pattern_set_matrix call
+@@ -784,6 +784,8 @@ _st_create_shadow_cairo_pattern (StShadow        *shadow_spec,
+ 
+   cairo_pattern_set_matrix (dst_pattern, &shadow_matrix);
+ 
++ out:
++  g_free (pixels_out);
+   return dst_pattern;
+ }
+ 
+--
+cgit v0.9




More information about the arch-commits mailing list