From df2795b7d741135fe4be18285e8a7e3d4a419234 Mon Sep 17 00:00:00 2001 From: Diego Escalante Urrelo Date: Sun, 30 Sep 2007 13:18:16 +0000 Subject: Changes g_value_set_string to g_value_take_string to avoid a leak. Also add the g_value_unset calls for text and visible vars on extracell_data_func. svn path=/trunk/; revision=7509 --- lib/widgets/ephy-location-entry.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/widgets/ephy-location-entry.c b/lib/widgets/ephy-location-entry.c index 08843166e..0282589ff 100644 --- a/lib/widgets/ephy-location-entry.c +++ b/lib/widgets/ephy-location-entry.c @@ -1028,11 +1028,14 @@ extracell_data_func (GtkCellLayout *cell_layout, g_value_init (&text, G_TYPE_STRING); g_value_init (&visible, G_TYPE_BOOLEAN); - g_value_set_string (&text, cdata); + g_value_take_string (&text, cdata); g_value_set_boolean (&visible, (cdata != NULL)); g_object_set_property (G_OBJECT (cell), "text", &text); g_object_set_property (G_OBJECT (cell), "visible", &visible); + + g_value_unset (&text); + g_value_unset (&visible); } void -- cgit v1.2.3