meta_display_get_tab_list(): Fix leaked GSList

https://bugzilla.gnome.org/show_bug.cgi?id=672640
This commit is contained in:
Pavel Vasin 2012-03-23 12:45:50 +04:00 committed by Rui Matos
parent 98d427ddba
commit 423bda908e

View File

@ -4654,12 +4654,13 @@ meta_display_get_tab_list (MetaDisplay *display,
tab_list = g_list_reverse (tab_list);
{
GSList *tmp;
GSList *windows, *tmp;
MetaWindow *l_window;
tmp = meta_display_list_windows (display, META_LIST_DEFAULT);
windows = meta_display_list_windows (display, META_LIST_DEFAULT);
/* Go through all windows */
tmp = windows;
while (tmp != NULL)
{
l_window=tmp->data;
@ -4675,6 +4676,8 @@ meta_display_get_tab_list (MetaDisplay *display,
tmp = tmp->next;
} /* End while tmp!=NULL */
g_slist_free (windows);
}
return tab_list;