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) cpw.khc.msnp14

Tue, 07 Aug 2007 22:07:26 +0000

author
Carlos Silva <typ0@pidgin.im>
date
Tue, 07 Aug 2007 22:07:26 +0000
branch
cpw.khc.msnp14
changeset 20561
2d90fb77398c
parent 20560
79e9c94c34db
child 20562
6ebd3000af51

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)

libpurple/protocols/msn/soap.c file | annotate | diff | comparison | revisions
--- 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;

mercurial