Accepting request 127956 from home:badshah400:branches:GNOME:Factory
Fix several memory leaks in gnome-shell; patches taken from upstream git commits [bnc#771565, bgo#678079, bgo#678406]. Needed for openSUSE:12.2 OBS-URL: https://build.opensuse.org/request/show/127956 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-shell?expand=0&rev=116
This commit is contained in:
parent
9b3348189b
commit
d8671fa7c7
179
gnome-shell-fix-memory-leaks.patch
Normal file
179
gnome-shell-fix-memory-leaks.patch
Normal file
@ -0,0 +1,179 @@
|
||||
From 7524210d1f2354266244c26d48d28a81f976a2a4 Mon Sep 17 00:00:00 2001
|
||||
From: Pavel Vasin <rat4vier@gmail.com>
|
||||
Date: Thu, 14 Jun 2012 08:21:25 +0000
|
||||
Subject: st-texture-cache: fix GtkIconInfo leak
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=678079
|
||||
---
|
||||
diff --git a/src/st/st-texture-cache.c b/src/st/st-texture-cache.c
|
||||
index 45f3930..68dd337 100644
|
||||
--- a/src/st/st-texture-cache.c
|
||||
+++ b/src/st/st-texture-cache.c
|
||||
@@ -933,6 +933,7 @@ load_gicon_with_colors (StTextureCache *cache,
|
||||
if (ensure_request (cache, key, policy, &request, texture))
|
||||
{
|
||||
/* If there's an outstanding request, we've just added ourselves to it */
|
||||
+ gtk_icon_info_free (info);
|
||||
g_free (key);
|
||||
}
|
||||
else
|
||||
--
|
||||
cgit v0.9.0.2
|
||||
|
||||
From 1cf2bb66469eb619e0422fe71a356738c6907e0e Mon Sep 17 00:00:00 2001
|
||||
From: Pavel Vasin <rat4vier@gmail.com>
|
||||
Date: Wed, 13 Jun 2012 10:48:23 +0000
|
||||
Subject: ShellContactSystem: fix GeeMapIterator leak
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=678079
|
||||
---
|
||||
diff --git a/src/shell-contact-system.c b/src/shell-contact-system.c
|
||||
index 8d5109f..88d329e 100644
|
||||
--- a/src/shell-contact-system.c
|
||||
+++ b/src/shell-contact-system.c
|
||||
@@ -463,6 +463,8 @@ shell_contact_system_initial_search (ShellContactSystem *self,
|
||||
g_object_unref (individual);
|
||||
}
|
||||
|
||||
+ g_object_unref (iter);
|
||||
+
|
||||
return sort_and_prepare_results (results);
|
||||
}
|
||||
|
||||
--
|
||||
cgit v0.9.0.2
|
||||
|
||||
|
||||
From 201dc05416140cf011c3e5401bfa3ad608ec4fd7 Mon Sep 17 00:00:00 2001
|
||||
From: Pavel Vasin <rat4vier@gmail.com>
|
||||
Date: Wed, 13 Jun 2012 16:51:57 +0000
|
||||
Subject: ShellContactSystem: fix GSList of utf8 leak
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=678079
|
||||
---
|
||||
diff --git a/src/shell-contact-system.c b/src/shell-contact-system.c
|
||||
index 4f5af70..8f00021 100644
|
||||
--- a/src/shell-contact-system.c
|
||||
+++ b/src/shell-contact-system.c
|
||||
@@ -464,6 +464,7 @@ shell_contact_system_initial_search (ShellContactSystem *self,
|
||||
}
|
||||
|
||||
g_object_unref (iter);
|
||||
+ g_slist_free_full (normalized_terms, (GDestroyNotify) g_free);
|
||||
|
||||
return sort_and_prepare_results (results);
|
||||
}
|
||||
--
|
||||
cgit v0.9.0.2
|
||||
|
||||
From 2b34978993bffa3bbfa00124f76ca8ea36d42c95 Mon Sep 17 00:00:00 2001
|
||||
From: Pavel Vasin <rat4vier@gmail.com>
|
||||
Date: Wed, 13 Jun 2012 16:48:06 +0000
|
||||
Subject: ShellContactSystem: fix GSList leak
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=678079
|
||||
---
|
||||
diff --git a/src/shell-contact-system.c b/src/shell-contact-system.c
|
||||
index 88d329e..4f5af70 100644
|
||||
--- a/src/shell-contact-system.c
|
||||
+++ b/src/shell-contact-system.c
|
||||
@@ -297,7 +297,7 @@ sort_and_prepare_results (GSList *results)
|
||||
sorted_results = g_slist_prepend (sorted_results, id);
|
||||
}
|
||||
|
||||
- g_slist_foreach (results, (GFunc) free_result, NULL);
|
||||
+ g_slist_free_full (results, (GDestroyNotify) free_result);
|
||||
|
||||
return sorted_results;
|
||||
}
|
||||
--
|
||||
cgit v0.9.0.2
|
||||
|
||||
From 447246da741da9126aadb41c98a9179290bbcd86 Mon Sep 17 00:00:00 2001
|
||||
From: Pavel Vasin <rat4vier@gmail.com>
|
||||
Date: Wed, 13 Jun 2012 12:49:20 +0000
|
||||
Subject: shell-util: fix GFile leak
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=678079
|
||||
---
|
||||
diff --git a/src/shell-util.c b/src/shell-util.c
|
||||
index bd211f0..12f0572 100644
|
||||
--- a/src/shell-util.c
|
||||
+++ b/src/shell-util.c
|
||||
@@ -96,6 +96,7 @@ shell_util_get_file_display_for_common_files (GFile *file)
|
||||
* nautilus */
|
||||
return g_strdup (_("Home"));
|
||||
}
|
||||
+ g_object_unref (compare);
|
||||
|
||||
compare = g_file_new_for_path ("/");
|
||||
if (g_file_equal (file, compare))
|
||||
--
|
||||
cgit v0.9.0.2
|
||||
|
||||
From 4e4092f9e88e68a1da29bd687384e02f5efd476b Mon Sep 17 00:00:00 2001
|
||||
From: Pavel Vasin <rat4vier@gmail.com>
|
||||
Date: Mon, 18 Jun 2012 17:14:59 +0000
|
||||
Subject: pokit-agent: fix memory leak
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=678406
|
||||
---
|
||||
diff --git a/src/shell-polkit-authentication-agent.c b/src/shell-polkit-authentication-agent.c
|
||||
index 472dea5..e85354a 100644
|
||||
--- a/src/shell-polkit-authentication-agent.c
|
||||
+++ b/src/shell-polkit-authentication-agent.c
|
||||
@@ -230,6 +230,7 @@ auth_request_free (AuthRequest *request)
|
||||
g_free (request->message);
|
||||
g_free (request->icon_name);
|
||||
g_object_unref (request->details);
|
||||
+ g_free (request->cookie);
|
||||
g_list_foreach (request->identities, (GFunc) g_object_unref, NULL);
|
||||
g_list_free (request->identities);
|
||||
g_object_unref (request->simple);
|
||||
--
|
||||
cgit v0.9.0.2
|
||||
|
||||
From 556d5d181e8bab9365a5ef69f18965648e2b406b Mon Sep 17 00:00:00 2001
|
||||
From: Pavel Vasin <rat4vier@gmail.com>
|
||||
Date: Mon, 18 Jun 2012 17:11:28 +0000
|
||||
Subject: st-widget: fix GList leak
|
||||
|
||||
clutter_actor_get_children returns a newly allocated GList and it was
|
||||
not freed.
|
||||
|
||||
However, as there's no reason to copy the children list, switch to
|
||||
iterator api.
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=678406
|
||||
---
|
||||
diff --git a/src/st/st-widget.c b/src/st/st-widget.c
|
||||
index 88d05c1..9546c1c 100644
|
||||
--- a/src/st/st-widget.c
|
||||
+++ b/src/st/st-widget.c
|
||||
@@ -762,18 +762,17 @@ st_widget_get_paint_volume (ClutterActor *self,
|
||||
static GList *
|
||||
st_widget_real_get_focus_chain (StWidget *widget)
|
||||
{
|
||||
- GList *children;
|
||||
+ ClutterActorIter iter;
|
||||
+ ClutterActor *child;
|
||||
GList *focus_chain = NULL;
|
||||
|
||||
- for (children = clutter_actor_get_children (CLUTTER_ACTOR (widget));
|
||||
- children;
|
||||
- children = children->next)
|
||||
+ clutter_actor_iter_init (&iter, CLUTTER_ACTOR (widget));
|
||||
+ while (clutter_actor_iter_next (&iter, &child))
|
||||
{
|
||||
- ClutterActor *child = children->data;
|
||||
-
|
||||
if (CLUTTER_ACTOR_IS_VISIBLE (child))
|
||||
focus_chain = g_list_prepend (focus_chain, child);
|
||||
}
|
||||
+
|
||||
return g_list_reverse (focus_chain);
|
||||
}
|
||||
|
||||
--
|
||||
cgit v0.9.0.2
|
||||
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Jul 14 07:44:17 UTC 2012 - badshah400@gmail.com
|
||||
|
||||
- Add various memory-leak fixes for gnome-shell from upstream git
|
||||
as gnome-shell-fix-memory-leaks.patch [bgo#678079, bgo#678406,
|
||||
bnc#771565].
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 28 21:24:30 UTC 2012 - dimstar@opensuse.org
|
||||
|
||||
|
@ -28,6 +28,8 @@ Source: http://download.gnome.org/sources/gnome-shell/3.4/%{name}-%{vers
|
||||
Patch0: gnome-shell-load-ext.patch
|
||||
# PATCH-FIX-UPSTREAM gnome-shell-private-connection.patch bnc#751211 bgo#646187 dimstar@opensuse.org -- create private connections if the user is not authorized
|
||||
Patch1: gnome-shell-private-connection.patch
|
||||
# PATCH-FIX-UPSTREAM gnome-shell-fix-memory-leaks.patch bnc#771565 bgo#678079 bgo#678406 badshah400@gmail.com -- Fix several memory leaks in gnome-shell; all patches came from upstream git
|
||||
Patch2: gnome-shell-fix-memory-leaks.patch
|
||||
# Needed by patch0
|
||||
BuildRequires: gnome-common
|
||||
BuildRequires: intltool
|
||||
@ -132,6 +134,7 @@ to enable, disable and install them.
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
translation-update-upstream
|
||||
|
||||
%build
|
||||
|
Loading…
x
Reference in New Issue
Block a user