Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 51329 invoked from network); 28 Nov 2006 02:06:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Nov 2006 02:06:33 -0000 Received: (qmail 72239 invoked by uid 500); 28 Nov 2006 02:06:41 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 72146 invoked by uid 500); 28 Nov 2006 02:06:41 -0000 Mailing-List: contact axis-cvs-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-cvs@ws.apache.org Received: (qmail 72135 invoked by uid 500); 28 Nov 2006 02:06:41 -0000 Delivered-To: apmail-ws-axis2-cvs@ws.apache.org Received: (qmail 72132 invoked by uid 99); 28 Nov 2006 02:06:41 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Nov 2006 18:06:41 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Nov 2006 18:06:31 -0800 Received: by eris.apache.org (Postfix, from userid 65534) id A60211A9846; Mon, 27 Nov 2006 18:05:53 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r479844 - in /webservices/axis2/trunk/c: axiom/src/attachments/ axiom/src/om/ axiom/src/soap/ modules/core/transport/http/ modules/core/transport/http/sender/ samples/client/mtom/ Date: Tue, 28 Nov 2006 02:05:53 -0000 To: axis2-cvs@ws.apache.org From: samisa@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20061128020553.A60211A9846@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: samisa Date: Mon Nov 27 18:05:52 2006 New Revision: 479844 URL: http://svn.apache.org/viewvc?view=rev&rev=479844 Log: Fixed more memory leaks; specially those related to MTOM stuff Modified: webservices/axis2/trunk/c/axiom/src/attachments/data_handler.c webservices/axis2/trunk/c/axiom/src/attachments/mime_output.c webservices/axis2/trunk/c/axiom/src/attachments/mime_parser.c webservices/axis2/trunk/c/axiom/src/om/om_text.c webservices/axis2/trunk/c/axiom/src/soap/soap_builder.c webservices/axis2/trunk/c/modules/core/transport/http/http_transport_utils.c webservices/axis2/trunk/c/modules/core/transport/http/http_worker.c webservices/axis2/trunk/c/modules/core/transport/http/sender/soap_over_http_sender.c webservices/axis2/trunk/c/samples/client/mtom/mtom_client.c Modified: webservices/axis2/trunk/c/axiom/src/attachments/data_handler.c URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/attachments/data_handler.c?view=diff&rev=479844&r1=479843&r2=479844 ============================================================================== --- webservices/axis2/trunk/c/axiom/src/attachments/data_handler.c (original) +++ webservices/axis2/trunk/c/axiom/src/attachments/data_handler.c Mon Nov 27 18:05:52 2006 @@ -140,6 +140,24 @@ AXIS2_ENV_CHECK(env, AXIS2_FAILURE); data_handler_impl = AXIS2_INTF_TO_IMPL(data_handler); + if (data_handler_impl->file_name) + { + AXIS2_FREE(env->allocator, data_handler_impl->file_name); + data_handler_impl->file_name = NULL; + } + + if (data_handler_impl->mime_type) + { + AXIS2_FREE(env->allocator, data_handler_impl->mime_type); + data_handler_impl->mime_type = NULL; + } + + if (data_handler_impl->buffer) + { + AXIS2_FREE(env->allocator, data_handler_impl->buffer); + data_handler_impl->buffer = NULL; + } + if (data_handler->ops) { AXIS2_FREE(env->allocator, data_handler->ops); Modified: webservices/axis2/trunk/c/axiom/src/attachments/mime_output.c URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/attachments/mime_output.c?view=diff&rev=479844&r1=479843&r2=479844 ============================================================================== --- webservices/axis2/trunk/c/axiom/src/attachments/mime_output.c (original) +++ webservices/axis2/trunk/c/axiom/src/attachments/mime_output.c Mon Nov 27 18:05:52 2006 @@ -249,6 +249,10 @@ mime_body_part = axis2_create_mime_body_part(text, env); axis2_write_body_part(mime_output, env, &temp_stream, &temp_stream_size, mime_body_part, boundary); + + AXIOM_MIME_BODY_PART_FREE(mime_body_part, env); + mime_body_part = NULL; + temp = output_stream_body_parts; temp_size = output_stream_body_parts_size; output_stream_body_parts_size = temp_size + @@ -327,6 +331,8 @@ { memcpy(stream_buffer + output_stream_start_size + output_stream_body_size, soap_body_buffer, soap_body_buffer_size); + AXIS2_FREE(env->allocator, soap_body_buffer); + soap_body_buffer = NULL; } if (output_stream_body_parts) Modified: webservices/axis2/trunk/c/axiom/src/attachments/mime_parser.c URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/attachments/mime_parser.c?view=diff&rev=479844&r1=479843&r2=479844 ============================================================================== --- webservices/axis2/trunk/c/axiom/src/attachments/mime_parser.c (original) +++ webservices/axis2/trunk/c/axiom/src/attachments/mime_parser.c Mon Nov 27 18:05:52 2006 @@ -119,11 +119,19 @@ AXIS2_ENV_CHECK(env, AXIS2_FAILURE); mime_parser_impl = AXIS2_INTF_TO_IMPL(mime_parser); - if (mime_parser_impl->mime_parts_map) + /* This map is passed on to SOAP builder, and SOAP builder take over the + ownership of the map */ + /*if (mime_parser_impl->mime_parts_map) { axis2_hash_free(mime_parser_impl->mime_parts_map, env); mime_parser_impl->mime_parts_map = NULL; - } + }*/ + + /*if (mime_parser_impl->soap_body_str) + { + AXIS2_FREE(env->allocator, mime_parser_impl->soap_body_str); + mime_parser_impl->soap_body_str = NULL; + }*/ if (mime_parser->ops) { @@ -473,6 +481,10 @@ memcpy(mime_id, id, mime_id_len); mime_id[mime_id_len] = '\0'; data_handler = axiom_data_handler_create(env, NULL, type); + + AXIS2_FREE(env->allocator, type); + type = NULL; + AXIOM_DATA_HANDLER_SET_BINARY_DATA(data_handler, env, mime_binary, mime_binary_len); axis2_hash_set(mime_parser_impl->mime_parts_map, mime_id, @@ -493,11 +505,11 @@ } - /*if (body_mime) + if (body_mime) { AXIS2_FREE(env->allocator, body_mime); body_mime = NULL; - }*/ + } body_mime = temp_body_mime; body_mime_len = temp_body_mime_len; @@ -505,11 +517,17 @@ }/*if (mime_parser_impl->mime_parts_map)*/ }/* end while (!end_of_mime) */ - /*if (body_mime) + if (body_mime) { AXIS2_FREE(env->allocator, body_mime); body_mime = NULL; - }*/ + } + + if (root_mime) + { + AXIS2_FREE(env->allocator, root_mime); + root_mime = NULL; + } AXIS2_FREE(env->allocator, buffer); buffer = NULL; Modified: webservices/axis2/trunk/c/axiom/src/om/om_text.c URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/om/om_text.c?view=diff&rev=479844&r1=479843&r2=479844 ============================================================================== --- webservices/axis2/trunk/c/axiom/src/om/om_text.c (original) +++ webservices/axis2/trunk/c/axiom/src/om/om_text.c Mon Nov 27 18:05:52 2006 @@ -267,6 +267,12 @@ text_impl->om_attribute = NULL; } + if (text_impl->data_handler) + { + AXIOM_DATA_HANDLER_FREE(text_impl->data_handler, env); + text_impl->data_handler = NULL; + } + if (om_text->ops) { AXIS2_FREE(env->allocator, om_text->ops); Modified: webservices/axis2/trunk/c/axiom/src/soap/soap_builder.c URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/soap/soap_builder.c?view=diff&rev=479844&r1=479843&r2=479844 ============================================================================== --- webservices/axis2/trunk/c/axiom/src/soap/soap_builder.c (original) +++ webservices/axis2/trunk/c/axiom/src/soap/soap_builder.c Mon Nov 27 18:05:52 2006 @@ -284,6 +284,13 @@ AXIOM_STAX_BUILDER_FREE(builder_impl->om_builder, env); builder_impl->om_builder = NULL; } + + if (builder_impl->mime_body_parts) + { + axis2_hash_free(builder_impl->mime_body_parts, env); + builder_impl->mime_body_parts = NULL; + } + if (builder->ops) { @@ -538,6 +545,7 @@ } } } + AXIS2_QNAME_FREE(qname, env); } } } Modified: webservices/axis2/trunk/c/modules/core/transport/http/http_transport_utils.c URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/http_transport_utils.c?view=diff&rev=479844&r1=479843&r2=479844 ============================================================================== --- webservices/axis2/trunk/c/modules/core/transport/http/http_transport_utils.c (original) +++ webservices/axis2/trunk/c/modules/core/transport/http/http_transport_utils.c Mon Nov 27 18:05:52 2006 @@ -293,14 +293,16 @@ if (stream) { AXIS2_STREAM_WRITE(stream, env, soap_body_str, soap_body_len); - AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, + /*AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "axis2_http_transport_utils_process_http_post_request soap_body_str = %s...%d soap_body_len=%d", - soap_body_str, strlen(soap_body_str), soap_body_len); + soap_body_str, strlen(soap_body_str), soap_body_len);*/ callback_ctx->in_stream = stream; callback_ctx->chunked_stream = NULL; callback_ctx->content_length = soap_body_len; callback_ctx->unread_len = soap_body_len; } + AXIOM_MIME_PARSER_FREE(mime_parser, env); + mime_parser = NULL; } AXIS2_FREE(env->allocator, mime_boundary); } @@ -1127,10 +1129,10 @@ callback_ctx->content_length = soap_body_len; callback_ctx->unread_len = soap_body_len; } + + AXIOM_MIME_PARSER_FREE(mime_parser, env); + mime_parser = NULL; } - /** - * TODO MTOM stuff - create builder and get envelope - */ } if (AXIS2_TRUE != AXIS2_MSG_CTX_GET_DOING_REST(msg_ctx, env)) Modified: webservices/axis2/trunk/c/modules/core/transport/http/http_worker.c URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/http_worker.c?view=diff&rev=479844&r1=479843&r2=479844 ============================================================================== --- webservices/axis2/trunk/c/modules/core/transport/http/http_worker.c (original) +++ webservices/axis2/trunk/c/modules/core/transport/http/http_worker.c Mon Nov 27 18:05:52 2006 @@ -454,6 +454,7 @@ in_msg_ctx = NULL; axis2_hash_set(msg_ctx_map, AXIS2_WSDL_MESSAGE_LABEL_IN_VALUE, AXIS2_HASH_KEY_STRING, NULL); } + } /* Done freeing message contexts */ msg_ctx = NULL; Modified: webservices/axis2/trunk/c/modules/core/transport/http/sender/soap_over_http_sender.c URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/sender/soap_over_http_sender.c?view=diff&rev=479844&r1=479843&r2=479844 ============================================================================== --- webservices/axis2/trunk/c/modules/core/transport/http/sender/soap_over_http_sender.c (original) +++ webservices/axis2/trunk/c/modules/core/transport/http/sender/soap_over_http_sender.c Mon Nov 27 18:05:52 2006 @@ -442,14 +442,15 @@ status_code = AXIS2_HTTP_CLIENT_SEND(sender_impl->client, env, request); - /*AXIS2_FREE(env->allocator, output_stream); - output_stream = NULL;*/ AXIS2_FREE(env->allocator, buffer); buffer = NULL; AXIS2_HTTP_SIMPLE_REQUEST_FREE(request, env); request = NULL; + + AXIS2_FREE(env->allocator, output_stream); + output_stream = NULL; status_code = AXIS2_HTTP_CLIENT_RECIEVE_HEADER(sender_impl->client, env); Modified: webservices/axis2/trunk/c/samples/client/mtom/mtom_client.c URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/client/mtom/mtom_client.c?view=diff&rev=479844&r1=479843&r2=479844 ============================================================================== --- webservices/axis2/trunk/c/samples/client/mtom/mtom_client.c (original) +++ webservices/axis2/trunk/c/samples/client/mtom/mtom_client.c Mon Nov 27 18:05:52 2006 @@ -136,6 +136,12 @@ svc_client = NULL; } + if (env) + { + axis2_env_free((axis2_env_t *) env); + env = NULL; + } + return 0; } --------------------------------------------------------------------- To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org For additional commands, e-mail: axis-cvs-help@ws.apache.org