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;