Wed, 15 Dec 2010 00:00:12 +0000
Fix a leak if an OIM SOAP request failed, probably due to the account
disconnecting/closing before a reply was received.
| libpurple/protocols/msn/oim.c | file | annotate | diff | comparison | revisions |
--- a/libpurple/protocols/msn/oim.c Tue Dec 14 06:19:13 2010 +0000 +++ b/libpurple/protocols/msn/oim.c Wed Dec 15 00:00:12 2010 +0000 @@ -166,14 +166,10 @@ 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;