# HG changeset patch # User Elliott Sales de Andrade # Date 1292371212 0 # Node ID 84c5575d08dec5e944e40c7b7704bc50e81aa3eb # Parent fa1a0dccd4fa9fd89b2b4aaf4e2c40fa4bbbe13e Fix a leak if an OIM SOAP request failed, probably due to the account disconnecting/closing before a reply was received. diff -r fa1a0dccd4fa -r 84c5575d08de libpurple/protocols/msn/oim.c --- 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;