axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dami...@apache.org
Subject svn commit: r382713 - /webservices/axis2/trunk/c/modules/util/dir_handler.c
Date Fri, 03 Mar 2006 08:21:38 GMT
Author: damitha
Date: Fri Mar  3 00:21:35 2006
New Revision: 382713

URL: http://svn.apache.org/viewcvs?rev=382713&view=rev
Log:
scandir allocated memeory is not deleted. Fixed it

Modified:
    webservices/axis2/trunk/c/modules/util/dir_handler.c

Modified: webservices/axis2/trunk/c/modules/util/dir_handler.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/util/dir_handler.c?rev=382713&r1=382712&r2=382713&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/util/dir_handler.c (original)
+++ webservices/axis2/trunk/c/modules/util/dir_handler.c Fri Mar  3 00:21:35 2006
@@ -46,7 +46,7 @@
 	{		 
         AXIS2_ARRAY_LIST_FREE(file_list, env);
         file_list = NULL;
-		printf("No files in this directory:%s\n", pathname);
+        AXIS2_LOG_DEBUG((*env)->log, AXIS2_LOG_SI, "No files in the path %s.", pathname);
 		return NULL;
 	}
     
@@ -74,6 +74,7 @@
             }
             AXIS2_ARRAY_LIST_FREE(file_list, env);
             file_list = NULL;
+            AXIS2_FREE((*env)->allocator, files);
             AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
             return NULL;
         }
@@ -98,6 +99,7 @@
             }
             AXIS2_ARRAY_LIST_FREE(file_list, env);
             file_list = NULL;
+            AXIS2_FREE((*env)->allocator, files);
             AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
             return NULL;
         }
@@ -122,6 +124,7 @@
             }
             AXIS2_ARRAY_LIST_FREE(file_list, env);
             file_list = NULL;
+            AXIS2_FREE((*env)->allocator, files);
             AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
             return NULL;
         }
@@ -148,6 +151,7 @@
             }
             AXIS2_ARRAY_LIST_FREE(file_list, env);
             file_list = NULL;
+            AXIS2_FREE((*env)->allocator, files);
             return NULL;
         }
         AXIS2_FREE((*env)->allocator, path);
@@ -157,6 +161,7 @@
         arch_file = NULL;
         fname = NULL;
     }
+    AXIS2_FREE((*env)->allocator, files);
     
     return file_list;
 }
@@ -221,6 +226,7 @@
             }
             AXIS2_ARRAY_LIST_FREE(file_list, env);
             file_list = NULL;
+            AXIS2_FREE((*env)->allocator, files);
             AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
             return NULL;
         }
@@ -245,6 +251,7 @@
             }
             AXIS2_ARRAY_LIST_FREE(file_list, env);
             file_list = NULL;
+            AXIS2_FREE((*env)->allocator, files);
             AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
             return NULL;
         }
@@ -271,6 +278,7 @@
             }
             AXIS2_ARRAY_LIST_FREE(file_list, env);
             file_list = NULL;
+            AXIS2_FREE((*env)->allocator, files);
             AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
             return NULL;
         }
@@ -298,6 +306,8 @@
             }
             AXIS2_ARRAY_LIST_FREE(file_list, env);
             file_list = NULL;
+            AXIS2_FREE((*env)->allocator, files);
+            return NULL;
             
         }
         AXIS2_FREE((*env)->allocator, path);
@@ -307,6 +317,7 @@
         arch_file = NULL;
         fname = NULL;
     }
+    AXIS2_FREE((*env)->allocator, files);
     
     return file_list;
 }



Mime
View raw message