summaryrefslogtreecommitdiffstats
path: root/string-leak.patch
blob: 19a25ad416fcedf693ab61f8818b4deb42c00b9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff -up metacity-2.23.610/src/ui/ui.c.string-leak metacity-2.23.610/src/ui/ui.c
--- metacity-2.23.610/src/ui/ui.c.string-leak	2008-08-18 08:29:07.000000000 -0400
+++ metacity-2.23.610/src/ui/ui.c	2008-09-15 18:05:20.000000000 -0400
@@ -657,10 +657,12 @@ meta_text_property_to_utf8 (Display     
                                           &list);
 
   if (count == 0)
-    return NULL;
-
-  retval = list[0];
-  list[0] = g_strdup (""); /* something to free */
+    retval = NULL;
+  else
+    {
+      retval = list[0];
+      list[0] = g_strdup (""); /* something to free */
+    }
   
   g_strfreev (list);