summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Vasin <rat4vier@gmail.com>2012-03-23 12:45:50 +0400
committerRui Matos <tiagomatos@gmail.com>2012-03-24 19:30:00 +0100
commit423bda908efdecf298761f9d1043c8bca5d018d0 (patch)
treeb7fbf5050aeaec17bfaa94e953c9330ebf5d5eec
parent98d427ddbaa75a00197176bb52aa31a30e1917cd (diff)
downloadmutter-423bda908efdecf298761f9d1043c8bca5d018d0.tar.gz
meta_display_get_tab_list(): Fix leaked GSList
https://bugzilla.gnome.org/show_bug.cgi?id=672640
-rw-r--r--src/core/display.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/display.c b/src/core/display.c
index ac1cab997..8f1fe3cc0 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -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;