comparison libpurple/protocols/msn/oim.c @ 31030:84c5575d08de

Fix a leak if an OIM SOAP request failed, probably due to the account disconnecting/closing before a reply was received.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Wed, 15 Dec 2010 00:00:12 +0000
parents b4285ea42b6e
children a8cc50c2279f
comparison
equal deleted inserted replaced
31026:fa1a0dccd4fa 31030:84c5575d08de
164 { 164 {
165 MsnOimRequestData *data = (MsnOimRequestData *)req_data; 165 MsnOimRequestData *data = (MsnOimRequestData *)req_data;
166 xmlnode *fault = NULL; 166 xmlnode *fault = NULL;
167 xmlnode *faultcode = NULL; 167 xmlnode *faultcode = NULL;
168 168
169 if (response == NULL) 169 if (response != NULL)
170 return; 170 fault = xmlnode_get_child(response->xml, "Body/Fault");
171 171
172 fault = xmlnode_get_child(response->xml, "Body/Fault"); 172 if (fault && (faultcode = xmlnode_get_child(fault, "faultcode"))) {
173 if (fault)
174 faultcode = xmlnode_get_child(fault, "faultcode");
175
176 if (faultcode) {
177 gchar *faultcode_str = xmlnode_get_data(faultcode); 173 gchar *faultcode_str = xmlnode_get_data(faultcode);
178 gboolean need_token_update = FALSE; 174 gboolean need_token_update = FALSE;
179 175
180 if (faultcode_str) { 176 if (faultcode_str) {
181 if (g_str_equal(faultcode_str, "q0:BadContextToken") || 177 if (g_str_equal(faultcode_str, "q0:BadContextToken") ||