axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@apache.org
Subject svn commit: r527889 - in /webservices/axis2/trunk/c: modules/core/clientapi/ modules/core/context/ modules/core/description/ modules/core/transport/http/receiver/ modules/core/transport/http/sender/ util/src/
Date Thu, 12 Apr 2007 12:01:39 GMT
Author: samisa
Date: Thu Apr 12 05:01:35 2007
New Revision: 527889

URL: http://svn.apache.org/viewvc?view=rev&rev=527889
Log:
Fixed some memory leaks

Modified:
    webservices/axis2/trunk/c/modules/core/clientapi/op_client.c
    webservices/axis2/trunk/c/modules/core/context/msg_ctx.c
    webservices/axis2/trunk/c/modules/core/description/svc.c
    webservices/axis2/trunk/c/modules/core/transport/http/receiver/http_svr_thread.c
    webservices/axis2/trunk/c/modules/core/transport/http/sender/http_sender.c
    webservices/axis2/trunk/c/util/src/url.c

Modified: webservices/axis2/trunk/c/modules/core/clientapi/op_client.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/clientapi/op_client.c?view=diff&rev=527889&r1=527888&r2=527889
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/op_client.c (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/op_client.c Thu Apr 12 05:01:35 2007
@@ -559,10 +559,20 @@
         axis2_op_ctx_free(op_client->op_ctx, env);
         op_client->op_ctx = NULL;
     }
+    
+    if (op_client->soap_version_uri)
+    {
+        AXIS2_FREE(env->allocator, op_client->soap_version_uri);
+    }
+
+    if (op_client->mep)
+    {
+        AXIS2_FREE(env->allocator, op_client->mep);
+    }
 
 	if(axis2_options_get_xml_parser_reset(op_client->options, env))
 	{
-            axiom_xml_reader_cleanup(); 
+        axiom_xml_reader_cleanup(); 
 	}
 
     AXIS2_FREE(env->allocator, op_client);

Modified: webservices/axis2/trunk/c/modules/core/context/msg_ctx.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/context/msg_ctx.c?view=diff&rev=527889&r1=527888&r2=527889
==============================================================================
--- webservices/axis2/trunk/c/modules/core/context/msg_ctx.c (original)
+++ webservices/axis2/trunk/c/modules/core/context/msg_ctx.c Thu Apr 12 05:01:35 2007
@@ -324,8 +324,7 @@
 
     if (msg_ctx->soap_envelope)
     {
-/*         AXIOM_SOAP_ENVELOPE_FREE(msg_ctx->soap_envelope, env); */
-        msg_ctx->soap_envelope = NULL;
+        axiom_soap_envelope_free(msg_ctx->soap_envelope, env);
     }
 
     if (msg_ctx->fault_soap_envelope)

Modified: webservices/axis2/trunk/c/modules/core/description/svc.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/description/svc.c?view=diff&rev=527889&r1=527888&r2=527889
==============================================================================
--- webservices/axis2/trunk/c/modules/core/description/svc.c (original)
+++ webservices/axis2/trunk/c/modules/core/description/svc.c Thu Apr 12 05:01:35 2007
@@ -672,6 +672,8 @@
     status = axis2_phase_resolver_disengage_module_from_svc(phase_resolver, env, svc,
         module_desc);
 
+    axis2_phase_resolver_free(phase_resolver, env);
+
     return status;
 }
 
@@ -683,7 +685,7 @@
 {
     axutil_hash_t *map = NULL;
     axutil_hash_index_t *index = NULL;
-    axis2_phase_resolver_t *pr = NULL;
+    axis2_phase_resolver_t *phase_resolver = NULL;
     axis2_op_t *op_desc = NULL;
     axis2_status_t status = AXIS2_FAILURE;
 
@@ -692,9 +694,9 @@
     AXIS2_PARAM_CHECK(env->error, conf, AXIS2_FAILURE);
 
     map = axis2_module_desc_get_all_ops(module_desc, env);
-    pr = axis2_phase_resolver_create_with_config_and_svc(env, conf, svc);
+    phase_resolver = axis2_phase_resolver_create_with_config_and_svc(env, conf, svc);
 
-    if (!pr)
+    if (!phase_resolver)
     {
         return AXIS2_FAILURE;
     }
@@ -714,9 +716,9 @@
 
         if (AXIS2_SUCCESS != AXIS2_ERROR_GET_STATUS_CODE(env->error))
         {
-            if (pr)
+            if (phase_resolver)
             {
-                axis2_phase_resolver_free(pr, env);
+                axis2_phase_resolver_free(phase_resolver, env);
             }
             return AXIS2_FAILURE;
         }
@@ -728,21 +730,21 @@
             status = axis2_svc_add_mapping(svc, env, mapping, op_desc);
             if (AXIS2_SUCCESS != status)
             {
-                if (pr)
+                if (phase_resolver)
                 {
-                    axis2_phase_resolver_free(pr, env);
+                    axis2_phase_resolver_free(phase_resolver, env);
                 }
                 return status;
             }
         }
 
-        status = axis2_phase_resolver_build_module_op(pr, env, op_desc);
+        status = axis2_phase_resolver_build_module_op(phase_resolver, env, op_desc);
 
         if (AXIS2_SUCCESS != status)
         {
-            if (pr)
+            if (phase_resolver)
             {
-                axis2_phase_resolver_free(pr, env);
+                axis2_phase_resolver_free(phase_resolver, env);
             }
             return status;
         }
@@ -750,18 +752,18 @@
         status = axis2_svc_add_op(svc, env, op_desc);
         if (AXIS2_SUCCESS != status)
         {
-            if (pr)
+            if (phase_resolver)
             {
-                axis2_phase_resolver_free(pr, env);
+                axis2_phase_resolver_free(phase_resolver, env);
             }
             return status;
         }
 
     }
 
-    if (pr)
+    if (phase_resolver)
     {
-        axis2_phase_resolver_free(pr, env);
+        axis2_phase_resolver_free(phase_resolver, env);
     }
     return AXIS2_SUCCESS;
 }

Modified: webservices/axis2/trunk/c/modules/core/transport/http/receiver/http_svr_thread.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/receiver/http_svr_thread.c?view=diff&rev=527889&r1=527888&r2=527889
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/receiver/http_svr_thread.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/receiver/http_svr_thread.c Thu Apr
12 05:01:35 2007
@@ -293,11 +293,11 @@
 
     if (thread_env)
     {
-        /*axutil_free_thread_env(thread_env);*/
+        axutil_free_thread_env(thread_env);
         thread_env = NULL;
     }
 #ifdef AXIS2_SVR_MULTI_THREADED
-    /*axutil_thread_pool_exit_thread(env->thread_pool, thd);*/
+    axutil_thread_pool_exit_thread(env->thread_pool, thd);
 #endif
 
     return NULL;

Modified: webservices/axis2/trunk/c/modules/core/transport/http/sender/http_sender.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/sender/http_sender.c?view=diff&rev=527889&r1=527888&r2=527889
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/sender/http_sender.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/sender/http_sender.c Thu Apr 12
05:01:35 2007
@@ -155,6 +155,7 @@
     int status_code = -1;
 	axis2_http_simple_response_t *response = NULL;
     axis2_char_t *content_type = NULL;
+    axis2_bool_t content_type_deepl_copy = AXIS2_TRUE;
     axis2_byte_t *output_stream = NULL;
     int output_stream_size = 0;
     axis2_bool_t doing_mtom = AXIS2_FALSE;
@@ -451,15 +452,17 @@
 				content_type = content_type_value;
 			else
 				content_type = AXIS2_HTTP_HEADER_ACCEPT_TEXT_XML;
+
+            content_type_deepl_copy = AXIS2_FALSE;
 		}
 
 		axis2_http_sender_util_add_header (env, request, AXIS2_HTTP_HEADER_CONTENT_TYPE, content_type);
 
-		/*if (content_type)
+        if (content_type_deepl_copy && content_type)
 		{
-			AXIS2_FREE(env->allocator, content_type);
-			content_type = NULL;
-		}*/
+            AXIS2_FREE(env->allocator, content_type);
+            content_type = NULL;
+        }
 	}
 
     if (0 == axutil_strcmp(sender->http_version,

Modified: webservices/axis2/trunk/c/util/src/url.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/url.c?view=diff&rev=527889&r1=527888&r2=527889
==============================================================================
--- webservices/axis2/trunk/c/util/src/url.c (original)
+++ webservices/axis2/trunk/c/util/src/url.c Thu Apr 12 05:01:35 2007
@@ -223,19 +223,18 @@
     if (url->protocol)
     {
         AXIS2_FREE(env->allocator, url->protocol);
-        url->protocol = NULL;
     }
     if (url->server)
     {
         AXIS2_FREE(env->allocator, url->server);
-        url->server = NULL;
     }
     if (url->path)
     {
         AXIS2_FREE(env->allocator, url->path);
-        url->path = NULL;
     }
     url->port = -1;
+
+    AXIS2_FREE(env->allocator, url);
 
     return;
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message