Mercurial > pidgin
comparison libpurple/protocols/msn/soap2.c @ 23450:b82a17934604
fixed a memleak or 3, or maybe 4, or 5. Some of these applies to the p14
code as well
author | Ka-Hing Cheung <khc@hxbc.us> |
---|---|
date | Wed, 26 Dec 2007 02:30:07 +0000 |
parents | bac263f5afe7 |
children | bca58b00afab |
comparison
equal
deleted
inserted
replaced
23449:8315e4604226 | 23450:b82a17934604 |
---|---|
227 msn_soap_handle_redirect(conn, urldata); | 227 msn_soap_handle_redirect(conn, urldata); |
228 g_free(urldata); | 228 g_free(urldata); |
229 } | 229 } |
230 | 230 |
231 g_free(faultdata); | 231 g_free(faultdata); |
232 msn_soap_message_destroy(response); | |
232 return TRUE; | 233 return TRUE; |
233 } else if (g_str_equal(faultdata, "wsse:FailedAuthentication")) { | 234 } else if (g_str_equal(faultdata, "wsse:FailedAuthentication")) { |
234 xmlnode *reason = xmlnode_get_child(body, "faultstring"); | 235 xmlnode *reason = xmlnode_get_child(body, "faultstring"); |
235 char *reasondata = xmlnode_get_data(reason); | 236 char *reasondata = xmlnode_get_data(reason); |
236 | 237 |
238 msn_session_set_error(conn->session, MSN_ERROR_AUTH, | 239 msn_session_set_error(conn->session, MSN_ERROR_AUTH, |
239 reasondata); | 240 reasondata); |
240 | 241 |
241 g_free(reasondata); | 242 g_free(reasondata); |
242 g_free(faultdata); | 243 g_free(faultdata); |
244 msn_soap_message_destroy(response); | |
243 return FALSE; | 245 return FALSE; |
244 } | 246 } |
245 | 247 |
246 g_free(faultdata); | 248 g_free(faultdata); |
247 } | 249 } |
250 if (fault || body) { | 252 if (fault || body) { |
251 MsnSoapRequest *request = conn->current_request; | 253 MsnSoapRequest *request = conn->current_request; |
252 conn->current_request = NULL; | 254 conn->current_request = NULL; |
253 request->cb(request->message, response, | 255 request->cb(request->message, response, |
254 request->cb_data); | 256 request->cb_data); |
257 msn_soap_message_destroy(response); | |
255 msn_soap_request_destroy(request); | 258 msn_soap_request_destroy(request); |
256 } | 259 } |
257 | 260 |
258 return TRUE; | 261 return TRUE; |
259 } | 262 } |