You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ma...@apache.org on 2008/07/08 08:36:20 UTC
svn commit: r674731 - in /webservices/axis2/branches/c/post_1_4_mtom/c:
axiom/src/attachments/mime_parser.c
src/core/transport/http/common/http_simple_response.c
src/core/transport/http/util/http_transport_utils.c
Author: manjula
Date: Mon Jul 7 23:36:19 2008
New Revision: 674731
URL: http://svn.apache.org/viewvc?rev=674731&view=rev
Log:
Fixing some memory leaks in the new implementation.
Modified:
webservices/axis2/branches/c/post_1_4_mtom/c/axiom/src/attachments/mime_parser.c
webservices/axis2/branches/c/post_1_4_mtom/c/src/core/transport/http/common/http_simple_response.c
webservices/axis2/branches/c/post_1_4_mtom/c/src/core/transport/http/util/http_transport_utils.c
Modified: webservices/axis2/branches/c/post_1_4_mtom/c/axiom/src/attachments/mime_parser.c
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/c/post_1_4_mtom/c/axiom/src/attachments/mime_parser.c?rev=674731&r1=674730&r2=674731&view=diff
==============================================================================
--- webservices/axis2/branches/c/post_1_4_mtom/c/axiom/src/attachments/mime_parser.c (original)
+++ webservices/axis2/branches/c/post_1_4_mtom/c/axiom/src/attachments/mime_parser.c Mon Jul 7 23:36:19 2008
@@ -850,6 +850,11 @@
{
end_of_mime = (AXIOM_MIME_BOUNDARY_BYTE == *(buf_array[buf_num])) &&
(AXIOM_MIME_BOUNDARY_BYTE == *(buf_array[buf_num] + 1));
+ if(end_of_mime)
+ {
+ AXIS2_FREE(env->allocator, buf_array[buf_num]);
+ buf_array[buf_num] = NULL;
+ }
}
if(mime_headers)
Modified: webservices/axis2/branches/c/post_1_4_mtom/c/src/core/transport/http/common/http_simple_response.c
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/c/post_1_4_mtom/c/src/core/transport/http/common/http_simple_response.c?rev=674731&r1=674730&r2=674731&view=diff
==============================================================================
--- webservices/axis2/branches/c/post_1_4_mtom/c/src/core/transport/http/common/http_simple_response.c (original)
+++ webservices/axis2/branches/c/post_1_4_mtom/c/src/core/transport/http/common/http_simple_response.c Mon Jul 7 23:36:19 2008
@@ -20,6 +20,7 @@
#include <stdio.h>
#include <string.h>
#include <axutil_types.h>
+#include <axiom_mime_part.h>
#define AXIS2_HTTP_SIMPLE_RESPONSE_READ_SIZE 2048
Modified: webservices/axis2/branches/c/post_1_4_mtom/c/src/core/transport/http/util/http_transport_utils.c
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/c/post_1_4_mtom/c/src/core/transport/http/util/http_transport_utils.c?rev=674731&r1=674730&r2=674731&view=diff
==============================================================================
--- webservices/axis2/branches/c/post_1_4_mtom/c/src/core/transport/http/util/http_transport_utils.c (original)
+++ webservices/axis2/branches/c/post_1_4_mtom/c/src/core/transport/http/util/http_transport_utils.c Mon Jul 7 23:36:19 2008
@@ -477,6 +477,12 @@
axiom_mime_parser_get_soap_body_str(mime_parser, env);
}
+ if(callback_ctx->chunked_stream)
+ {
+ axutil_http_chunked_stream_free(callback_ctx->chunked_stream, env);
+ callback_ctx->chunked_stream = NULL;
+ }
+
stream = axutil_stream_create_basic(env);
if (stream)
{
@@ -2107,6 +2113,12 @@
axiom_mime_parser_get_soap_body_str(mime_parser, env);
}
+ if(callback_ctx->chunked_stream)
+ {
+ axutil_http_chunked_stream_free(callback_ctx->chunked_stream, env);
+ callback_ctx->chunked_stream = NULL;
+ }
+
stream = axutil_stream_create_basic(env);
if (stream)
{
@@ -2187,6 +2199,12 @@
axutil_stream_free(stream, env);
callback_ctx->in_stream = NULL;
}
+ if(callback_ctx->chunked_stream)
+ {
+ axutil_http_chunked_stream_free(callback_ctx->chunked_stream, env);
+ callback_ctx->chunked_stream = NULL;
+ }
+
}
else
{