axis-c-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nand...@apache.org
Subject svn commit: r1426481 - /axis/axis2/c/core/trunk/src/core/deployment/dep_engine.c
Date Fri, 28 Dec 2012 12:45:52 GMT
Author: nandika
Date: Fri Dec 28 12:45:52 2012
New Revision: 1426481

URL: http://svn.apache.org/viewvc?rev=1426481&view=rev
Log:
Fixed memory leak

Modified:
    axis/axis2/c/core/trunk/src/core/deployment/dep_engine.c

Modified: axis/axis2/c/core/trunk/src/core/deployment/dep_engine.c
URL: http://svn.apache.org/viewvc/axis/axis2/c/core/trunk/src/core/deployment/dep_engine.c?rev=1426481&r1=1426480&r2=1426481&view=diff
==============================================================================
--- axis/axis2/c/core/trunk/src/core/deployment/dep_engine.c (original)
+++ axis/axis2/c/core/trunk/src/core/deployment/dep_engine.c Fri Dec 28 12:45:52 2012
@@ -565,6 +565,15 @@ axis2_dep_engine_free(
         axis2_repos_listener_free(dep_engine->repos_listener, env);
     }
 
+    if(dep_engine->module_dir)
+    {
+	AXIS2_FREE(env->allocator, dep_engine->module_dir);
+    }
+    if(dep_engine->svc_dir)
+    {
+	AXIS2_FREE(env->allocator, dep_engine->svc_dir);
+    }
+
     if(dep_engine)
     {
         AXIS2_FREE(env->allocator, dep_engine);
@@ -1978,7 +1987,7 @@ axis2_dep_engine_set_svc_and_module_dir_
             dirpath = (axis2_char_t *)axutil_param_get_value(dep_param, env);
             if(dirpath)
             {
-                dep_engine->module_dir = dirpath;
+                dep_engine->module_dir = axutil_strdup(env, dirpath);
                 dirpath = NULL;
             }
         }
@@ -1990,7 +1999,7 @@ axis2_dep_engine_set_svc_and_module_dir_
             dirpath = (axis2_char_t *)axutil_param_get_value(dep_param, env);
             if(dirpath)
             {
-                dep_engine->svc_dir = dirpath;
+                dep_engine->svc_dir = axutil_strdup(env, dirpath);
                 dirpath = NULL;
             }
         }



Mime
View raw message