[glade/gbinding] Fix memory leak (thanks Juan!)
- From: Denis Washington <denisw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade/gbinding] Fix memory leak (thanks Juan!)
- Date: Fri, 10 Jun 2011 12:03:58 +0000 (UTC)
commit f442df3bfb0b5d59f4b5037ad596ef505cf8131c
Author: Denis Washington <denisw src gnome org>
Date: Fri Jun 10 13:57:25 2011 +0200
Fix memory leak (thanks Juan!)
gladeui/glade-binding.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/gladeui/glade-binding.c b/gladeui/glade-binding.c
index 08f4858..6416df3 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]