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 2006/03/24 10:05:10 UTC

svn commit: r388466 - /webservices/axis2/trunk/c/modules/core/description/param.c

Author: samisa
Date: Fri Mar 24 01:05:10 2006
New Revision: 388466

URL: http://svn.apache.org/viewcvs?rev=388466&view=rev
Log:
Fixed param value free

Modified:
    webservices/axis2/trunk/c/modules/core/description/param.c

Modified: webservices/axis2/trunk/c/modules/core/description/param.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/description/param.c?rev=388466&r1=388465&r2=388466&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/description/param.c (original)
+++ webservices/axis2/trunk/c/modules/core/description/param.c Fri Mar 24 01:05:10 2006
@@ -175,8 +175,21 @@
 							axis2_env_t **env, 
 							void *value)
 {
+    void *param_value = NULL;
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     
+    param_value = axis2_param_get_value(param, env);
+    if(param_value)
+    {
+        if(param->ops && param->ops->value_free)
+        { 
+            param->ops->value_free(param_value, env);
+        }
+        else /* we assume that param value is axis2_char_t* */
+        {
+            AXIS2_FREE((*env)->allocator, param_value);
+        }
+    }
     AXIS2_INTF_TO_IMPL(param)->value = value;
     return AXIS2_SUCCESS;
 }