Merge lp:~vanvugt/compiz/fix-1060171 into lp:compiz/0.9.9

Proposed by Daniel van Vugt
Status: Merged
Approved by: Sam Spilsbury
Approved revision: 3411
Merged at revision: 3411
Proposed branch: lp:~vanvugt/compiz/fix-1060171
Merge into: lp:compiz/0.9.9
Diff against target: 26 lines (+10/-0)
1 file modified
gtk/window-decorator/wnck.c (+10/-0)
To merge this branch: bzr merge lp:~vanvugt/compiz/fix-1060171
Reviewer Review Type Date Requested Status
Sam Spilsbury Approve
jenkins (community) continuous-integration Needs Fixing
Review via email: mp+128157@code.launchpad.net

Commit message

Fix leakage of destroyed_pixmaps_table, containing pointers to freed decor_t's
which could result in a freed GHashTable being passed into g_hash_table_remove
and causing a crash.
(LP: #1060171)

To post a comment you must log in.
Revision history for this message
jenkins (martin-mrazik+qa) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Sam Spilsbury (smspillaz) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'gtk/window-decorator/wnck.c'
2--- gtk/window-decorator/wnck.c 2012-09-27 09:03:24 +0000
3+++ gtk/window-decorator/wnck.c 2012-10-05 03:56:23 +0000
4@@ -455,12 +455,22 @@
5 d->created = TRUE;
6 }
7
8+gboolean
9+clean_destroyed_pixmaps (gpointer key, gpointer value, gpointer d)
10+{
11+ return value == d;
12+}
13+
14 void
15 remove_frame_window (WnckWindow *win)
16 {
17 decor_t *d = g_object_get_data (G_OBJECT (win), "decor");
18 Display *xdisplay;
19
20+ g_hash_table_foreach_remove (destroyed_pixmaps_table,
21+ clean_destroyed_pixmaps,
22+ d);
23+
24 xdisplay = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
25
26 if (!d->frame_window)

Subscribers

People subscribed via source and target branches