meta_stack_update_window_tile_matches(): Fix leaked GList

https://bugzilla.gnome.org/show_bug.cgi?id=672640
This commit is contained in:
Pavel Vasin 2012-03-23 09:58:52 +04:00 committed by Rui Matos
parent 7a35579c3f
commit 98d427ddba

View File

@ -257,16 +257,17 @@ void
meta_stack_update_window_tile_matches (MetaStack *stack, meta_stack_update_window_tile_matches (MetaStack *stack,
MetaWorkspace *workspace) MetaWorkspace *workspace)
{ {
GList *windows; GList *windows, *tmp;
if (stack->freeze_count > 0) if (stack->freeze_count > 0)
return; return;
windows = meta_stack_list_windows (stack, workspace); windows = meta_stack_list_windows (stack, workspace);
while (windows) tmp = windows;
while (tmp)
{ {
meta_window_compute_tile_match ((MetaWindow *) windows->data); meta_window_compute_tile_match ((MetaWindow *) tmp->data);
windows = windows->next; tmp = tmp->next;
} }
g_list_free (windows); g_list_free (windows);