summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Washington <denisw@src.gnome.org>2011-06-10 13:57:25 +0200
committerDenis Washington <denisw@src.gnome.org>2011-06-10 13:57:25 +0200
commitf442df3bfb0b5d59f4b5037ad596ef505cf8131c (patch)
tree4c3af2750e7b1598993df1c8c425173aefa4f03c
parent3da5aeb8b3858cf5cbdb89b61cbf458222281e05 (diff)
downloadglade-f442df3bfb0b5d59f4b5037ad596ef505cf8131c.tar.gz
Fix memory leak (thanks Juan!)
-rw-r--r--gladeui/glade-binding.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gladeui/glade-binding.c b/gladeui/glade-binding.c
index 08f48586..6416df3c 100644
--- a/gladeui/glade-binding.c
+++ b/gladeui/glade-binding.c
@@ -276,7 +276,15 @@ glade_binding_read (GladeXmlNode *node,
source = glade_xml_get_property_string_required (node, GLADE_XML_TAG_SOURCE, NULL);
if (!to || !from || !source)
- return NULL;
+ {
+ if (to)
+ g_free (to);
+ if (from)
+ g_free (from);
+ if (source)
+ g_free (source);
+ return NULL;
+ }
target = glade_widget_get_property (widget, to);
binding = glade_binding_new (NULL, target);