Package: metacity / 1:2.34.3-4

10_leak.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
From d2b82ba621df8693e560bf0e10c6c56d155cb107 Mon Sep 17 00:00:00 2001
From: Pavel Vasin <rat4vier@gmail.com>
Date: Fri, 23 Mar 2012 08:45:50 +0000
Subject: meta_display_get_tab_list(): Fix leaked GSList

https://bugzilla.gnome.org/show_bug.cgi?id=672640
---
diff --git a/src/core/display.c b/src/core/display.c
index caae7ff..b70112d 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -4385,12 +4385,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);
+    windows = meta_display_list_windows (display);
 
     /* Go through all windows */
+    tmp = windows;
     while (tmp != NULL)
       {
         l_window=tmp->data;
@@ -4406,6 +4407,8 @@ meta_display_get_tab_list (MetaDisplay   *display,
 
         tmp = tmp->next;
       } /* End while tmp!=NULL */
+
+    g_slist_free (windows);
   }
   
   return tab_list;
--
cgit v0.9.0.2