[gtk+] Use g_value_take_string to avoid redundant invoking g_free.
- From: Javier Jardón <jjardon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Use g_value_take_string to avoid redundant invoking g_free.
- Date: Thu, 25 Mar 2010 16:01:45 +0000 (UTC)
commit 22b0149b784f6814829c9f2457923ec5edabcc6c
Author: Hiroyuki Ikezoe <poincare ikezoe net>
Date: Mon Dec 21 15:34:06 2009 +0900
Use g_value_take_string to avoid redundant invoking g_free.
gtk/gtkwidget.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 0202617..f02b481 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -2794,8 +2794,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:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]