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
=== modified file 'gtk/window-decorator/wnck.c'
--- gtk/window-decorator/wnck.c 2012-09-27 09:03:24 +0000
+++ gtk/window-decorator/wnck.c 2012-10-05 03:56:23 +0000
@@ -455,12 +455,22 @@
455 d->created = TRUE;455 d->created = TRUE;
456}456}
457457
458gboolean
459clean_destroyed_pixmaps (gpointer key, gpointer value, gpointer d)
460{
461 return value == d;
462}
463
458void464void
459remove_frame_window (WnckWindow *win)465remove_frame_window (WnckWindow *win)
460{466{
461 decor_t *d = g_object_get_data (G_OBJECT (win), "decor");467 decor_t *d = g_object_get_data (G_OBJECT (win), "decor");
462 Display *xdisplay;468 Display *xdisplay;
463469
470 g_hash_table_foreach_remove (destroyed_pixmaps_table,
471 clean_destroyed_pixmaps,
472 d);
473
464 xdisplay = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());474 xdisplay = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
465475
466 if (!d->frame_window)476 if (!d->frame_window)

Subscribers

People subscribed via source and target branches