Merge lp:~aacid/dconf/fix_g_slist_remove into lp:~ubuntu-desktop/dconf/ubuntu

Proposed by Albert Astals Cid
Status: Merged
Merge reported by: Sebastien Bacher
Merged at revision: not available
Proposed branch: lp:~aacid/dconf/fix_g_slist_remove
Merge into: lp:~ubuntu-desktop/dconf/ubuntu
Diff against target: 26 lines (+14/-0)
2 files modified
debian/patches/fix_g_slist_remove.patch (+13/-0)
debian/patches/series (+1/-0)
To merge this branch: bzr merge lp:~aacid/dconf/fix_g_slist_remove
Reviewer Review Type Date Requested Status
Ubuntu Desktop Pending
Review via email: mp+97692@code.launchpad.net

Commit message

Call g_slist_remove_link instead of g_slist_remove since we are passing the GSList* to remove not the data to remove

Description of the change

Call g_slist_remove_link instead of g_slist_remove since we are passing the GSList* to remove not the data to remove

This fixes a crash because calling g_slist_remove will fail and thus next time the list is iterated the data will still be there and bad things will happen

To post a comment you must log in.
Revision history for this message
Albert Astals Cid (aacid) wrote :
Revision history for this message
Albert Astals Cid (aacid) wrote :

Upstream has commited the patch

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'debian/patches/fix_g_slist_remove.patch'
2--- debian/patches/fix_g_slist_remove.patch 1970-01-01 00:00:00 +0000
3+++ debian/patches/fix_g_slist_remove.patch 2012-03-15 16:16:23 +0000
4@@ -0,0 +1,13 @@
5+diff --git a/dbus-1/dconf-dbus-1.c b/dbus-1/dconf-dbus-1.c
6+index a1fd98a..50dc0f8 100644
7+--- a/dbus-1/dconf-dbus-1.c
8++++ b/dbus-1/dconf-dbus-1.c
9+@@ -597,7 +597,7 @@ dconf_dbus_client_unsubscribe (DConfDBusClient *dcdbc,
10+
11+ if (watch->notify == notify && watch->user_data == user_data)
12+ {
13+- *ptr = g_slist_remove (*ptr, *ptr);
14++ *ptr = g_slist_remove_link (*ptr, *ptr);
15+
16+ dconf_engine_unwatch (dcdbc->engine, watch->name, &dcem);
17+ dconf_dbus_client_send (dcdbc, &dcem, NULL, NULL);
18
19=== modified file 'debian/patches/series'
20--- debian/patches/series 2011-03-23 04:10:03 +0000
21+++ debian/patches/series 2012-03-15 16:16:23 +0000
22@@ -2,3 +2,4 @@
23 foreign-automake.patch
24 remove-ACLOCAL_AMFLAGS.patch
25 use-gtk2.patch
26+fix_g_slist_remove.patch

Subscribers

People subscribed via source and target branches