aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/msn/soap.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2010-03-20 21:58:04 +0000
committerWilmer van der Gaast <wilmer@gaast.net>2010-03-20 21:58:04 +0000
commitffb6dea650db7671d2414b1a9541cf0baba8ff11 (patch)
tree4293bcfc0482e8d26a0bd8880a1728acabe58b85 /protocols/msn/soap.c
parente5a8118236442d51eb202a8bdebe5866449554e4 (diff)
Killing some memory leaks.
Diffstat (limited to 'protocols/msn/soap.c')
-rw-r--r--protocols/msn/soap.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/protocols/msn/soap.c b/protocols/msn/soap.c
index d3a022ec..f329cea9 100644
--- a/protocols/msn/soap.c
+++ b/protocols/msn/soap.c
@@ -102,6 +102,8 @@ static int msn_soap_send_request( struct msn_soap_req_data *soap_req )
soap_req->http_req = http_dorequest( url.host, url.port, url.proto == PROTO_HTTPS,
http_req, msn_soap_handle_response, soap_req );
+ g_free( http_req );
+
return soap_req->http_req != NULL;
}
@@ -122,14 +124,16 @@ static void msn_soap_handle_response( struct http_request *http_req )
st = soap_req->handle_response( soap_req );
+ g_free( soap_req->url );
+ g_free( soap_req->action );
+ g_free( soap_req->payload );
+ soap_req->url = soap_req->action = soap_req->payload = NULL;
+
if( st == MSN_SOAP_RETRY && --soap_req->ttl )
msn_soap_send_request( soap_req );
else
{
soap_req->free_data( soap_req );
- g_free( soap_req->url );
- g_free( soap_req->action );
- g_free( soap_req->payload );
g_free( soap_req );
}
}