[glade/gbinding] Fix a memory leak in glade_property_set_binding_transform_func()



commit 85f59336094549948469c4690e73c983c2779773
Author: Denis Washington <denisw src gnome org>
Date:   Mon Aug 1 12:06:55 2011 +0200

    Fix a memory leak in glade_property_set_binding_transform_func()

 gladeui/glade-property.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gladeui/glade-property.c b/gladeui/glade-property.c
index 8c14650..84e713f 100644
--- a/gladeui/glade-property.c
+++ b/gladeui/glade-property.c
@@ -1911,7 +1911,9 @@ glade_property_set_binding_transform_func (GladeProperty *property,
 {
   g_return_if_fail (GLADE_IS_PROPERTY (property));
 
+  g_free (property->priv->binding_transform_func);
   property->priv->binding_transform_func = g_strdup (transform_func);
+
   g_object_notify_by_pspec (G_OBJECT (property),
                             properties[PROP_BINDING_TRANSFORM_FUNC]);  
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]