From 61a73b3df63c62cca8680dcc81577a06f7c26f41 Mon Sep 17 00:00:00 2001 From: Hiroyuki Ikezoe Date: Mon, 21 Dec 2009 15:34:06 +0900 Subject: [PATCH] Use g_value_take_string to avoid redundant invoking g_free. --- gtk/gtkwidget.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 90f54d2e22..bea125944e 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -2808,8 +2808,7 @@ gtk_widget_get_property (GObject *object, if (escaped && !pango_parse_markup (escaped, -1, 0, NULL, &text, NULL, NULL)) g_assert (NULL == text); /* text should still be NULL in case of markup errors */ - g_value_set_string (value, text); - g_free (text); + g_value_take_string (value, text); } break; case PROP_TOOLTIP_MARKUP: