axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dami...@apache.org
Subject svn commit: r612726 - /webservices/axis2/trunk/c/src/core/description/op.c
Date Thu, 17 Jan 2008 06:19:24 GMT
Author: damitha
Date: Wed Jan 16 22:19:14 2008
New Revision: 612726

URL: http://svn.apache.org/viewvc?rev=612726&view=rev
Log:
Fixing memory leak in wsa_mapping_list by freeing it's string elements when freeing the array

Modified:
    webservices/axis2/trunk/c/src/core/description/op.c

Modified: webservices/axis2/trunk/c/src/core/description/op.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/description/op.c?rev=612726&r1=612725&r2=612726&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/description/op.c (original)
+++ webservices/axis2/trunk/c/src/core/description/op.c Wed Jan 16 22:19:14 2008
@@ -227,6 +227,16 @@
     }
     if (op->wsamapping_list)
     {
+        int i = 0;
+        int size = 0;
+        size = axutil_array_list_size(op->wsamapping_list, env);
+        for(i = 0; i < size; i++)
+        {
+            axis2_char_t *temp_str = axutil_array_list_get(op->wsamapping_list, 
+                env, i);
+            if(temp_str)
+                AXIS2_FREE(env->allocator, temp_str);
+        }
         axutil_array_list_free(op->wsamapping_list, env);
     }
 
@@ -1235,6 +1245,16 @@
 
     if (op->wsamapping_list)
     {
+        int i = 0;
+        int size = 0;
+        size = axutil_array_list_size(op->wsamapping_list, env);
+        for(i = 0; i < size; i++)
+        {
+            axis2_char_t *temp_str = axutil_array_list_get(op->wsamapping_list, 
+                env, i);
+            if(temp_str)
+                AXIS2_FREE(env->allocator, temp_str);
+        }
         axutil_array_list_free(op->wsamapping_list, env);
         op->wsamapping_list = NULL;
     }



---------------------------------------------------------------------
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