[libgdata] contacts: Fix a leak in a parsing error condition



commit 2029616d693bf306092943ec118de3a8f43e5bb2
Author: Philip Withnall <philip tecnocode co uk>
Date:   Sat Sep 4 15:21:15 2010 +0100

    contacts: Fix a leak in a parsing error condition

 gdata/services/contacts/gdata-contacts-contact.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gdata/services/contacts/gdata-contacts-contact.c b/gdata/services/contacts/gdata-contacts-contact.c
index 8d1add9..d8b9e8f 100644
--- a/gdata/services/contacts/gdata-contacts-contact.c
+++ b/gdata/services/contacts/gdata-contacts-contact.c
@@ -840,8 +840,10 @@ parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_da
 				return gdata_parser_error_required_property_missing (node, "href", error);
 
 			/* Has it been deleted? */
-			if (gdata_parser_boolean_from_property (node, "deleted", &deleted_bool, 0, error) == FALSE)
+			if (gdata_parser_boolean_from_property (node, "deleted", &deleted_bool, 0, error) == FALSE) {
+				xmlFree (href);
 				return FALSE;
+			}
 
 			/* Insert it into the hash table */
 			g_hash_table_insert (self->priv->groups, (gchar*) href, GUINT_TO_POINTER (deleted_bool));



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