From 8ae0650416e952b655a7e73d003e399dc4e827dc Mon Sep 17 00:00:00 2001 From: nandika Date: Fri, 28 Dec 2012 12:45:52 +0000 Subject: Fixed memory leak git-svn-id: http://svn.apache.org/repos/asf/axis/axis2/c/core/trunk@1426481 13f79535-47bb-0310-9956-ffa450edef68 --- src/core/deployment/dep_engine.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/core/deployment/dep_engine.c b/src/core/deployment/dep_engine.c index de03d99..2ccbb83 100644 --- a/src/core/deployment/dep_engine.c +++ b/src/core/deployment/dep_engine.c @@ -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_path( 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_path( 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; } } -- cgit v1.1-32-gdbae