pidgin: 4387bc0d: Fix a leak if an OIM SOAP request failed...

qulogic at pidgin.im qulogic at pidgin.im
Thu Dec 16 02:27:33 EST 2010


----------------------------------------------------------------------
Revision: 4387bc0db265ded1b97c5dfd14ddf121236f63e1
Parent:   fb1c260d832a5cda681f09a6e2ac440cd079a4c2
Author:   qulogic at pidgin.im
Date:     12/14/10 19:00:12
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/4387bc0db265ded1b97c5dfd14ddf121236f63e1

Changelog: 

Fix a leak if an OIM SOAP request failed, probably due to the account
disconnecting/closing before a reply was received.

Changes against parent fb1c260d832a5cda681f09a6e2ac440cd079a4c2

  patched  libpurple/protocols/msn/oim.c

-------------- next part --------------
============================================================
--- libpurple/protocols/msn/oim.c	06534ce3edc89d75f3d6390e8666ba0b411805aa
+++ libpurple/protocols/msn/oim.c	ca0b232f7ea96a54b6731c3c3c06687f4e4d3099
@@ -166,14 +166,10 @@ msn_oim_request_cb(MsnSoapMessage *reque
 	xmlnode *fault = NULL;
 	xmlnode *faultcode = NULL;
 
-	if (response == NULL)
-		return;
+	if (response != NULL)
+		fault = xmlnode_get_child(response->xml, "Body/Fault");
 
-	fault = xmlnode_get_child(response->xml, "Body/Fault");
-	if (fault)
-		faultcode = xmlnode_get_child(fault, "faultcode");
-
-	if (faultcode) {
+	if (fault && (faultcode = xmlnode_get_child(fault, "faultcode"))) {
 		gchar *faultcode_str = xmlnode_get_data(faultcode);
 		gboolean need_token_update = FALSE;
 


More information about the Commits mailing list