changeset 21108:cc43e75a1da7

merge of '772308477d928d281291577b4419345699dbadab' and 'ed4bbce61c745ed89765f52ffe38807c3ee2c9ed'
author Ka-Hing Cheung <khc@hxbc.us>
date Thu, 25 Oct 2007 08:33:59 +0000
parents 95684692f622 (current diff) ca624eda4267 (diff)
children 13279824fe64
files libpurple/protocols/msn/contact.c
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/contact.c	Thu Oct 25 08:32:44 2007 +0000
+++ b/libpurple/protocols/msn/contact.c	Thu Oct 25 08:33:59 2007 +0000
@@ -348,6 +348,7 @@
 			 service; service = xmlnode_get_next_twin(service)) {
 			msn_parse_each_service(contact->session, service);
 		}
+		g_free(typedata);
 	}
 }
 
@@ -403,8 +404,6 @@
 	if ( update_time != NULL ) {
 		purple_debug_info("MSNCL","Last update time: %s\n",update_time);
 		update_str = g_strdup_printf(MSN_GET_CONTACT_UPDATE_XML,update_time);
-	} else {
-		update_str = g_strdup("");
 	}
 
 	body = g_strdup_printf(MSN_GET_CONTACT_TEMPLATE, partner_scenario_str,
@@ -692,6 +691,10 @@
 			msn_send_privacy(session->account->gc);
 			msn_notification_dump_contact(session);
 		}
+
+		/*free the read buffer*/
+		msn_soap_free_read_buf(soapconn);
+		return TRUE;
 	} else {
 		/* This is making us loop infinitely when we fail to parse the
 		  address book, disable for now (we should re-enable when we
@@ -702,6 +705,7 @@
 		*/
 		msn_session_disconnect(session);
 		purple_connection_error(session->account->gc, _("Unable to retrieve MSN Address Book"));
+		return FALSE;
 	}
 }
 
@@ -1263,7 +1267,7 @@
 
 	if (resp == NULL) {
 		msn_callback_state_free(state);
-		return;
+		return TRUE;
 	}
 
 	if (state) {