You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by sa...@apache.org on 2007/05/01 04:24:23 UTC

svn commit: r533910 - /webservices/axis2/trunk/c/src/core/transport/http/common/http_worker.c

Author: samisa
Date: Mon Apr 30 19:24:22 2007
New Revision: 533910

URL: http://svn.apache.org/viewvc?view=rev&rev=533910
Log:
Fixed memory leaking per request

Modified:
    webservices/axis2/trunk/c/src/core/transport/http/common/http_worker.c

Modified: webservices/axis2/trunk/c/src/core/transport/http/common/http_worker.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/transport/http/common/http_worker.c?view=diff&rev=533910&r1=533909&r2=533910
==============================================================================
--- webservices/axis2/trunk/c/src/core/transport/http/common/http_worker.c (original)
+++ webservices/axis2/trunk/c/src/core/transport/http/common/http_worker.c Mon Apr 30 19:24:22 2007
@@ -393,10 +393,9 @@
     {
         axis2_msg_ctx_t *out_msg_ctx = NULL, *in_msg_ctx = NULL;
         axis2_msg_ctx_t **msg_ctx_map = NULL;
-        
+        axis2_char_t *msg_id = NULL;
+        axis2_conf_ctx_t *conf_ctx = NULL;
         msg_ctx_map =  axis2_op_ctx_get_msg_ctx_map(op_ctx, env);
-        if(!axis2_op_ctx_is_in_use(op_ctx, env))
-            axis2_op_ctx_destroy_mutex(op_ctx, env);
 
         out_msg_ctx = msg_ctx_map[AXIS2_WSDL_MESSAGE_LABEL_OUT];
         in_msg_ctx = msg_ctx_map[AXIS2_WSDL_MESSAGE_LABEL_IN];
@@ -410,11 +409,24 @@
 
         if (in_msg_ctx)
         {
+            msg_id = axis2_msg_ctx_get_msg_id(in_msg_ctx, env);
+            conf_ctx = axis2_msg_ctx_get_conf_ctx(in_msg_ctx, env);
+        
             axis2_msg_ctx_free(in_msg_ctx, env);
             in_msg_ctx = NULL;
             msg_ctx_map[AXIS2_WSDL_MESSAGE_LABEL_IN] = NULL;
         }
 
+        if(!axis2_op_ctx_is_in_use(op_ctx, env))
+        {
+            axis2_op_ctx_destroy_mutex(op_ctx, env);
+            if (conf_ctx && msg_id)
+            {
+                axis2_conf_ctx_register_op_ctx(conf_ctx, env, msg_id, NULL);
+            }
+            axis2_op_ctx_free(op_ctx, env);
+        }
+        
     } /* Done freeing message contexts */
     
     msg_ctx = NULL;



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