[mutter] meta_display_get_tab_list(): Fix leaked GSList
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] meta_display_get_tab_list(): Fix leaked GSList
- Date: Sat, 24 Mar 2012 18:31:54 +0000 (UTC)
commit 423bda908efdecf298761f9d1043c8bca5d018d0
Author: Pavel Vasin <rat4vier gmail com>
Date: Fri Mar 23 12:45:50 2012 +0400
meta_display_get_tab_list(): Fix leaked GSList
https://bugzilla.gnome.org/show_bug.cgi?id=672640
src/core/display.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/core/display.c b/src/core/display.c
index ac1cab9..8f1fe3c 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]