changeset 20478:c1c4468207fa

msn_soap_read_buf() shouldn't be used after calling soapconn->read_cb as this callback function can sometimes free soapconn (such as in nexus_login_read_cb after closing nexus connection)
author Carlos Silva <typ0@pidgin.im>
date Tue, 07 Aug 2007 22:07:26 +0000
parents 9a2a4a0c0003
children 6a8463be5b23
files libpurple/protocols/msn/soap.c
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/soap.c	Tue Aug 07 02:37:58 2007 +0000
+++ b/libpurple/protocols/msn/soap.c	Tue Aug 07 22:07:26 2007 +0000
@@ -474,7 +474,6 @@
 			if ( soapconn->need_to_read > 0 ) {
 				return;
 			}
-			//g_free(body_len);
 
 			/*remove the read handler*/
 			purple_input_remove(soapconn->input_handler);
@@ -494,7 +493,6 @@
 			if ( soapconn->read_cb != NULL ) {
 				soapconn->read_cb(soapconn, source, 0);
 			}
-			msn_soap_free_read_buf(soapconn);
 	}
 	return;
 }
@@ -502,7 +500,7 @@
 void 
 msn_soap_free_read_buf(MsnSoapConn *soapconn)
 {
-	if(soapconn->read_buf){
+	if (soapconn->read_buf) {
 		g_free(soapconn->read_buf);
 	}
 	soapconn->read_buf = NULL;