From 1381f6d5f2e84820bd639d245320ddd0dbcb1e60 Mon Sep 17 00:00:00 2001 From: Thomas James Alexander Thurman Date: Wed, 28 Jan 2009 02:00:33 +0000 Subject: [PATCH] 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 --- ChangeLog | 5 +++++ src/ui/ui.c | 10 ++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index d5cb66c9a..a8d60d224 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-01-27 Matthias Claesen + + * src/ui/ui.c: free the result of gdk_text_property_to_utf8_list() + even when it returns no data. + 2009-01-27 Owen Taylor GtkStyle is specific to a particular colormap. Metacity diff --git a/src/ui/ui.c b/src/ui/ui.c index 010130c00..6df289f62 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);