From ee9d060d4221963c6e5bf5950a7e9b99c10cba29 Mon Sep 17 00:00:00 2001 From: shankar Date: Mon, 5 Apr 2010 12:57:09 +0000 Subject: Fixing memory leaks git-svn-id: http://svn.apache.org/repos/asf/axis/axis2/c/core/trunk@930851 13f79535-47bb-0310-9956-ffa450edef68 --- src/core/transport/http/common/http_worker.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/core/transport/http/common') diff --git a/src/core/transport/http/common/http_worker.c b/src/core/transport/http/common/http_worker.c index 26ccce3..9306d8c 100644 --- a/src/core/transport/http/common/http_worker.c +++ b/src/core/transport/http/common/http_worker.c @@ -775,8 +775,7 @@ axis2_http_worker_process_request( url_ext_form); } - if(url_ext_form) - AXIS2_FREE(env->allocator, url_ext_form); + if(AXIS2_FAILURE == status && (is_put || axis2_msg_ctx_get_doing_rest(msg_ctx, env))) { /* Failure Occur while processing REST */ @@ -1105,6 +1104,11 @@ axis2_http_worker_process_request( status = AXIS2_TRUE; } + if(url_ext_form) + { + AXIS2_FREE(env->allocator, url_ext_form); + } + op_ctx = axis2_msg_ctx_get_op_ctx(msg_ctx, env); if (op_ctx) { @@ -1807,6 +1811,11 @@ axis2_http_worker_process_request( } } /* Done freeing message contexts */ + else + { + /* cases like HEAD, WSDL */ + axis2_msg_ctx_free(msg_ctx, env); + } msg_ctx = NULL; axutil_url_free(request_url, env); -- cgit v1.1-32-gdbae