summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
authorThomas James Alexander Thurman <tthurman@src.gnome.org>2009-01-28 02:00:33 +0000
committerThomas James Alexander Thurman <tthurman@src.gnome.org>2009-01-28 02:00:33 +0000
commit1381f6d5f2e84820bd639d245320ddd0dbcb1e60 (patch)
tree60f709860c084befd553c2edbe45956a8f9c52aa /src/ui
parenta6c951352fee59826edb68bbfbd80c96b75a3169 (diff)
downloadmetacity-1381f6d5f2e84820bd639d245320ddd0dbcb1e60.tar.gz
metacity-1381f6d5f2e84820bd639d245320ddd0dbcb1e60.tar.bz2
free the result of gdk_text_property_to_utf8_list() even when it returns
* src/ui/ui.c: free the result of gdk_text_property_to_utf8_list() even when it returns no data. svn path=/trunk/; revision=4093
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/ui.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/ui/ui.c b/src/ui/ui.c
index 010130c..6df289f 100644
--- a/src/ui/ui.c
+++ b/src/ui/ui.c
@@ -671,10 +671,12 @@ meta_text_property_to_utf8 (Display *xdisplay,
&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);