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/02/17 08:22:30 UTC
svn commit: r378454 - in /webservices/axis2/trunk/c: include/
modules/core/clientapi/ modules/core/deployment/ modules/core/engine/
modules/core/transport/http/server/ modules/wsdl/ modules/xml/om/
samples/client/math/
Author: samisa
Date: Thu Feb 16 23:22:27 2006
New Revision: 378454
URL: http://svn.apache.org/viewcvs?rev=378454&view=rev
Log:
Fixed some memory leaks
Modified:
webservices/axis2/trunk/c/include/axis2_conf.h
webservices/axis2/trunk/c/modules/core/clientapi/call.c
webservices/axis2/trunk/c/modules/core/deployment/arch_reader.c
webservices/axis2/trunk/c/modules/core/deployment/conf_builder.c
webservices/axis2/trunk/c/modules/core/deployment/conf_init.c
webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c
webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c
webservices/axis2/trunk/c/modules/core/deployment/module_builder.c
webservices/axis2/trunk/c/modules/core/engine/conf.c
webservices/axis2/trunk/c/modules/core/transport/http/server/http_server_main.c
webservices/axis2/trunk/c/modules/wsdl/wsdl_component.c
webservices/axis2/trunk/c/modules/xml/om/om_stax_builder.c
webservices/axis2/trunk/c/samples/client/math/math_client.c
Modified: webservices/axis2/trunk/c/include/axis2_conf.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_conf.h?rev=378454&r1=378453&r2=378454&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_conf.h (original)
+++ webservices/axis2/trunk/c/include/axis2_conf.h Thu Feb 16 23:22:27 2006
@@ -54,6 +54,8 @@
struct axis2_svc;
struct axis2_op;
+struct axis2_dep_engine;
+
/**
* @brief Engine Configuration ops struct
* Encapsulator struct for ops of axis2_config
@@ -302,6 +304,10 @@
axis2_env_t **env,
axis2_qname_t *module_ref);
+ axis2_status_t (AXIS2_CALL *
+ set_dep_engine)(axis2_conf_t *conf,
+ axis2_env_t **env,
+ struct axis2_dep_engine *dep_engine);
};
@@ -454,6 +460,8 @@
#define AXIS2_CONF_ENGAGE_MODULE(conf, env, module_ref) \
((conf)->ops->engage_module(conf , env, module_ref))
+#define AXIS2_CONF_SET_DEP_ENGINE(conf, env, dep_engine) \
+ ((conf)->ops->set_dep_engine(conf, env, dep_engine))
/************************* End of function macros *****************************/
Modified: webservices/axis2/trunk/c/modules/core/clientapi/call.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/clientapi/call.c?rev=378454&r1=378453&r2=378454&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/call.c (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/call.c Thu Feb 16 23:22:27 2006
@@ -280,6 +280,23 @@
call_impl->callback_recv = NULL;
}
+ if (call_impl->svc_ctx)
+ {
+ axis2_conf_ctx_t *conf_ctx = AXIS2_SVC_CTX_GET_CONF_CTX(call_impl->svc_ctx, env);
+ if (conf_ctx)
+ {
+ axis2_conf_t *conf = AXIS2_CONF_CTX_GET_CONF(conf_ctx, env);
+ if (conf)
+ {
+ AXIS2_CONF_CTX_FREE(conf, env);
+ conf = NULL;
+ }
+
+ AXIS2_CONF_CTX_FREE(conf_ctx, env);
+ conf_ctx = NULL;
+ }
+ }
+
AXIS2_FREE((*env)->allocator, call_impl);
call_impl = NULL;
Modified: webservices/axis2/trunk/c/modules/core/deployment/arch_reader.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/arch_reader.c?rev=378454&r1=378453&r2=378454&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/arch_reader.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/arch_reader.c Thu Feb 16 23:22:27 2006
@@ -379,7 +379,6 @@
return AXIS2_FAILURE;
}
svcs = AXIS2_DESC_BUILDER_BUILD_OM(desc_builder, env);
- AXIS2_DESC_BUILDER_FREE(desc_builder, env);
svcs_element = AXIS2_OM_NODE_GET_DATA_ELEMENT(svcs, env);
root_element_name = AXIS2_OM_ELEMENT_GET_LOCALNAME(svcs_element, env);
if(0 == AXIS2_STRCMP(AXIS2_SVC_ELEMENT, root_element_name))
Modified: webservices/axis2/trunk/c/modules/core/deployment/conf_builder.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/conf_builder.c?rev=378454&r1=378453&r2=378454&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/conf_builder.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/conf_builder.c Thu Feb 16 23:22:27 2006
@@ -153,6 +153,12 @@
AXIS2_FREE((*env)->allocator, conf_builder->ops);
conf_builder->ops = NULL;
}
+
+ if (conf_builder_impl->conf_builder.desc_builder)
+ {
+ AXIS2_DESC_BUILDER_FREE(conf_builder_impl->conf_builder.desc_builder, env);
+ conf_builder_impl->conf_builder.desc_builder = NULL;
+ }
if(conf_builder_impl)
{
Modified: webservices/axis2/trunk/c/modules/core/deployment/conf_init.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/conf_init.c?rev=378454&r1=378453&r2=378454&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/conf_init.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/conf_init.c Thu Feb 16 23:22:27 2006
@@ -45,6 +45,7 @@
{
return NULL;
}
+ AXIS2_CONF_SET_DEP_ENGINE(conf, env, dep_engine);
phase_resolver = axis2_phase_resolver_create_with_config(env, conf);
if (!phase_resolver)
@@ -100,7 +101,8 @@
axis2_init_modules(env, conf_ctx);
axis2_init_transports(env, conf_ctx);
-
+
+ /*AXIS2_DEP_ENGINE_FREE(dep_engine, env);*/
return conf_ctx;
}
Modified: webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c?rev=378454&r1=378453&r2=378454&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c Thu Feb 16 23:22:27 2006
@@ -72,7 +72,10 @@
*/
axis2_array_list_t *module_list;
+ axis2_repos_listener_t *repos_listener; /*Added this here to help with feeing memory allocated for this - Samisa*/
+ axis2_conf_builder_t *conf_builder;
+ axis2_svc_builder_t *svc_builder;
} axis2_dep_engine_impl_t;
#define AXIS2_INTF_TO_IMPL(dep_engine) ((axis2_dep_engine_impl_t *) dep_engine)
@@ -307,6 +310,9 @@
engine_impl->folder_name = NULL;
engine_impl->conf_name = NULL;
engine_impl->dep_engine.ops = NULL;
+ engine_impl->repos_listener = NULL;
+ engine_impl->conf_builder = NULL;
+ engine_impl->svc_builder = NULL;
engine_impl->ws_to_deploy = axis2_array_list_create(env, 0);
if (!(engine_impl->ws_to_deploy))
@@ -471,11 +477,25 @@
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
engine_impl = AXIS2_INTF_TO_IMPL(dep_engine);
+
if(engine_impl->curr_file)
{
AXIS2_ARCH_FILE_DATA_FREE(engine_impl->curr_file, env);
engine_impl->curr_file = NULL;
}
+
+ if(engine_impl->conf_builder)
+ {
+ AXIS2_ARCH_FILE_DATA_FREE(engine_impl->conf_builder, env);
+ engine_impl->conf_builder = NULL;
+ }
+
+ if(engine_impl->svc_builder)
+ {
+ AXIS2_ARCH_FILE_DATA_FREE(engine_impl->svc_builder, env);
+ engine_impl->svc_builder = NULL;
+ }
+
if(engine_impl->ws_to_deploy)
{
int i = 0;
@@ -542,13 +562,18 @@
engine_impl->axis2_repos = NULL;
}
+ if(engine_impl->repos_listener)
+ {
+ AXIS2_REPOS_LISTENER_FREE(engine_impl->repos_listener, env);
+ engine_impl->repos_listener = NULL;
+ }
+
if(NULL != dep_engine->ops)
{
AXIS2_FREE((*env)->allocator, dep_engine->ops);
dep_engine->ops = NULL;
}
-
return AXIS2_SUCCESS;
}
@@ -700,8 +725,6 @@
axis2_env_t **env)
{
axis2_dep_engine_impl_t *engine_impl = NULL;
- axis2_conf_builder_t *builder = NULL;
- axis2_repos_listener_t *repos_listener = NULL;
axis2_status_t status = AXIS2_FAILURE;
AXIS2_ENV_CHECK(env, NULL);
engine_impl = AXIS2_INTF_TO_IMPL(dep_engine);
@@ -720,15 +743,14 @@
return NULL;
}
- builder = axis2_conf_builder_create_with_file_and_dep_engine_and_conf(env,
+ engine_impl->conf_builder = axis2_conf_builder_create_with_file_and_dep_engine_and_conf(env,
engine_impl->conf_name, dep_engine, engine_impl->conf);
- if(!builder)
+ if(!(engine_impl->conf_builder))
{
AXIS2_CONF_FREE(engine_impl->conf, env);
engine_impl->conf = NULL;
}
- status = AXIS2_CONF_BUILDER_POPULATE_CONF(builder, env);
- AXIS2_CONF_BUILDER_FREE(builder, env);
+ status = AXIS2_CONF_BUILDER_POPULATE_CONF(engine_impl->conf_builder, env);
if(AXIS2_SUCCESS != status)
{
AXIS2_CONF_FREE(engine_impl->conf, env);
@@ -749,10 +771,14 @@
else
{
*/
- repos_listener =
+ if (engine_impl->repos_listener)
+ {
+ AXIS2_REPOS_LISTENER_FREE(engine_impl->repos_listener, env);
+ }
+ engine_impl->repos_listener =
axis2_repos_listener_create_with_folder_name_and_dep_engine(env,
engine_impl->folder_name, dep_engine);
- if(!repos_listener)
+ if(!engine_impl->repos_listener)
{
AXIS2_CONF_FREE(engine_impl->conf, env);
return NULL;
@@ -761,7 +787,7 @@
status = axis2_dep_engine_validate_system_predefined_phases(dep_engine, env);
if(AXIS2_SUCCESS != status)
{
- AXIS2_REPOS_LISTENER_FREE(repos_listener, env);
+ AXIS2_REPOS_LISTENER_FREE(engine_impl->repos_listener, env);
AXIS2_CONF_FREE(engine_impl->conf, env);
AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_MODULE_VALIDATION_FAILED,
AXIS2_FAILURE);
@@ -771,7 +797,7 @@
status = AXIS2_CONF_SET_PHASESINFO(engine_impl->conf, env, engine_impl->phases_info);
if(AXIS2_SUCCESS != status)
{
- AXIS2_REPOS_LISTENER_FREE(repos_listener, env);
+ AXIS2_REPOS_LISTENER_FREE(engine_impl->repos_listener, env);
AXIS2_CONF_FREE(engine_impl->conf, env);
return NULL;
}
@@ -779,7 +805,7 @@
status = axis2_dep_engine_engage_modules(dep_engine, env);
if(AXIS2_SUCCESS != status)
{
- AXIS2_REPOS_LISTENER_FREE(repos_listener, env);
+ AXIS2_REPOS_LISTENER_FREE(engine_impl->repos_listener, env);
AXIS2_CONF_FREE(engine_impl->conf, env);
AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_MODULE_VALIDATION_FAILED,
AXIS2_FAILURE);
@@ -797,8 +823,6 @@
axis2_char_t *client_home)
{
axis2_dep_engine_impl_t *engine_impl = NULL;
- axis2_conf_builder_t *builder = NULL;
- axis2_repos_listener_t *repos_listener = NULL;
axis2_bool_t is_repos_exist = AXIS2_FALSE;
axis2_status_t status = AXIS2_FAILURE;
@@ -835,18 +859,17 @@
{
return NULL;
}
- builder = axis2_conf_builder_create_with_file_and_dep_engine_and_conf(env,
+ engine_impl->conf_builder = axis2_conf_builder_create_with_file_and_dep_engine_and_conf(env,
engine_impl->conf_name, dep_engine, engine_impl->conf);
- if(!builder)
+ if(!(engine_impl->conf_builder))
{
AXIS2_CONF_FREE(engine_impl->conf, env);
engine_impl->conf = NULL;
}
- status = AXIS2_CONF_BUILDER_POPULATE_CONF(builder, env);
+ status = AXIS2_CONF_BUILDER_POPULATE_CONF(engine_impl->conf_builder, env);
if(AXIS2_SUCCESS != status)
{
AXIS2_CONF_FREE(engine_impl->conf, env);
- AXIS2_CONF_BUILDER_FREE(builder, env);
engine_impl->conf = NULL;
return NULL;
}
@@ -855,7 +878,11 @@
{
engine_impl->hot_dep = AXIS2_FALSE;
engine_impl->hot_update = AXIS2_FALSE;
- repos_listener =
+ if (engine_impl->repos_listener)
+ {
+ AXIS2_REPOS_LISTENER_FREE(engine_impl->repos_listener, env);
+ }
+ engine_impl->repos_listener =
axis2_repos_listener_create_with_folder_name_and_dep_engine(env,
engine_impl->folder_name, dep_engine);
}
@@ -865,9 +892,8 @@
status = axis2_dep_engine_engage_modules(dep_engine, env);
if(AXIS2_FAILURE == status)
{
- AXIS2_REPOS_LISTENER_FREE(repos_listener, env);
+ AXIS2_REPOS_LISTENER_FREE(engine_impl->repos_listener, env);
AXIS2_CONF_FREE(engine_impl->conf, env);
- AXIS2_CONF_BUILDER_FREE(builder, env);
AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_MODULE_VALIDATION_FAILED,
AXIS2_FAILURE);
return NULL;
@@ -1459,6 +1485,7 @@
/* log.info(Messages.getMessage(
DeploymentErrorMsgs.DEPLOYING_WS, currentArchiveFile.getName())); */
engine_impl->curr_file = NULL;
+ AXIS2_ARCH_READER_FREE(arch_reader, env);
break;
case AXIS2_MODULE:
arch_reader = axis2_arch_reader_create(env);
@@ -1485,7 +1512,7 @@
/*log.info(Messages.getMessage(DeploymentErrorMsgs.DEPLOYING_MODULE,
metaData.getName().getLocalPart())); */
engine_impl->curr_file = NULL;
-
+ AXIS2_ARCH_READER_FREE(arch_reader, env);
break;
}
@@ -1601,7 +1628,6 @@
axis2_char_t *file_name)
{
axis2_dep_engine_impl_t *engine_impl = NULL;
- axis2_svc_builder_t *builder = NULL;
axis2_om_node_t *node = NULL;
AXIS2_ENV_CHECK(env, NULL);
@@ -1611,11 +1637,11 @@
engine_impl->curr_file = axis2_arch_file_data_create_with_type_and_name(
env, AXIS2_SVC, "");
- builder = axis2_svc_builder_create_with_file_and_dep_engine_and_svc(env,
+ engine_impl->svc_builder = axis2_svc_builder_create_with_file_and_dep_engine_and_svc(env,
file_name, dep_engine, svc);
- node = AXIS2_DESC_BUILDER_BUILD_OM(builder->desc_builder, env);
- AXIS2_SVC_BUILDER_POPULATE_SVC(builder, env, node);
+ node = AXIS2_DESC_BUILDER_BUILD_OM(engine_impl->svc_builder->desc_builder, env);
+ AXIS2_SVC_BUILDER_POPULATE_SVC(engine_impl->svc_builder, env, node);
axis2_dep_engine_load_svc_props(dep_engine, env, svc);
return svc;
@@ -1706,6 +1732,7 @@
}
engine_impl->curr_file = NULL;
+ AXIS2_ARCH_READER_FREE(arch_reader, env);
/*axismodule.setModuleClassLoader(currentArchiveFile.getClassLoader()); */
return module_desc;
Modified: webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c?rev=378454&r1=378453&r2=378454&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c Thu Feb 16 23:22:27 2006
@@ -32,6 +32,7 @@
* Store the full path to configuration file.
*/
axis2_char_t *file_name;
+ axis2_om_stax_builder_t *builder;
} axis2_desc_builder_impl_t;
@@ -123,7 +124,7 @@
}
desc_builder_impl->file_name = NULL;
desc_builder_impl->desc_builder.engine = NULL;
-
+ desc_builder_impl->builder = NULL;
desc_builder_impl->desc_builder.ops = NULL;
desc_builder_impl->desc_builder.ops =
@@ -230,6 +231,13 @@
AXIS2_FREE((*env)->allocator, desc_builder_impl->file_name);
desc_builder_impl->file_name = NULL;
}
+
+ if(desc_builder_impl->builder)
+ {
+ AXIS2_OM_STAX_BUILDER_FREE(desc_builder_impl->builder, env);
+ desc_builder_impl->builder = NULL;
+ }
+
/* we cannot free deployment engine here */
desc_builder->engine = NULL;
@@ -249,7 +257,6 @@
axis2_env_t **env)
{
axis2_desc_builder_impl_t *builder_impl = NULL;
- axis2_om_stax_builder_t *builder = NULL;
axis2_xml_reader_t *reader = NULL;
axis2_om_document_t *document = NULL;
axis2_om_node_t *root = NULL;
@@ -276,9 +283,9 @@
}
/** create axis2_om_stax_builder by parsing pull_parser struct */
- builder = axis2_om_stax_builder_create (env, reader);
+ builder_impl->builder = axis2_om_stax_builder_create (env, reader);
- if(!builder)
+ if(!(builder_impl->builder))
{
AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_CREATING_XML_STREAM_READER,
AXIS2_FAILURE)
@@ -288,7 +295,7 @@
create an om document
document is the container of om model created using builder
*/
- document = axis2_om_document_create (env, NULL, builder);
+ document = axis2_om_document_create (env, NULL, builder_impl->builder);
/**
* In description building we don't want defferred building. So build
* the whole tree at once
Modified: webservices/axis2/trunk/c/modules/core/deployment/module_builder.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/module_builder.c?rev=378454&r1=378453&r2=378454&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/module_builder.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/module_builder.c Thu Feb 16 23:22:27 2006
@@ -130,6 +130,12 @@
module_builder->ops = NULL;
}
+ if(module_builder_impl->module_builder.desc_builder)
+ {
+ AXIS2_DESC_BUILDER_FREE(module_builder_impl->module_builder.desc_builder, env);
+ module_builder_impl->module_builder.desc_builder = NULL;
+ }
+
if(module_builder_impl)
{
AXIS2_FREE((*env)->allocator, module_builder_impl);
Modified: webservices/axis2/trunk/c/modules/core/engine/conf.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/engine/conf.c?rev=378454&r1=378453&r2=378454&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/engine/conf.c (original)
+++ webservices/axis2/trunk/c/modules/core/engine/conf.c Thu Feb 16 23:22:27 2006
@@ -54,7 +54,7 @@
axis2_hash_t *faulty_svcs;
axis2_hash_t *faulty_modules;
axis2_char_t *axis2_repos;
-
+ axis2_dep_engine_t *dep_engine;
};
#define AXIS2_INTF_TO_IMPL(conf) ((axis2_conf_impl_t *)conf)
@@ -268,6 +268,11 @@
axis2_env_t **env,
axis2_phase_t *dispatch);
+axis2_status_t AXIS2_CALL
+axis2_conf_set_dep_engine(axis2_conf_t *conf,
+ axis2_env_t **env,
+ axis2_dep_engine_t *dep_engine);
+
axis2_status_t AXIS2_CALL
axis2_conf_engage_module(axis2_conf_t *conf,
@@ -317,6 +322,7 @@
config_impl->faulty_svcs = NULL;
config_impl->faulty_modules = NULL;
config_impl->axis2_repos = NULL;
+ config_impl->dep_engine = NULL;
config_impl->conf.ops = NULL;
config_impl->conf.param_container = (axis2_param_container_t *)
@@ -549,6 +555,7 @@
config_impl->conf.ops->get_repos = axis2_conf_get_repos;
config_impl->conf.ops->set_repos = axis2_conf_set_repos;
config_impl->conf.ops->engage_module = axis2_conf_engage_module;
+ config_impl->conf.ops->set_dep_engine = axis2_conf_set_dep_engine;
return &(config_impl->conf);
}
@@ -577,6 +584,12 @@
conf->param_container = NULL;
}
+ if(NULL != config_impl->dep_engine)
+ {
+ AXIS2_PARAM_CONTAINER_FREE(config_impl->dep_engine, env);
+ config_impl->dep_engine= NULL;
+ }
+
if(config_impl->svc_grps)
{
axis2_hash_index_t *hi = NULL;
@@ -1811,5 +1824,16 @@
conf_impl->axis2_repos = NULL;
}
conf_impl->axis2_repos = AXIS2_STRDUP(repos_path, env);
+ return AXIS2_SUCCESS;
+}
+
+
+axis2_status_t AXIS2_CALL
+axis2_conf_set_dep_engine(axis2_conf_t *conf,
+ axis2_env_t **env,
+ axis2_dep_engine_t *dep_engine)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_INTF_TO_IMPL(conf)->dep_engine = dep_engine;
return AXIS2_SUCCESS;
}
Modified: webservices/axis2/trunk/c/modules/core/transport/http/server/http_server_main.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/transport/http/server/http_server_main.c?rev=378454&r1=378453&r2=378454&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/server/http_server_main.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/server/http_server_main.c Thu Feb 16 23:22:27 2006
@@ -200,4 +200,4 @@
}
}
}
-#endif
\ No newline at end of file
+#endif
Modified: webservices/axis2/trunk/c/modules/wsdl/wsdl_component.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/wsdl_component.c?rev=378454&r1=378453&r2=378454&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/wsdl_component.c (original)
+++ webservices/axis2/trunk/c/modules/wsdl/wsdl_component.c Thu Feb 16 23:22:27 2006
@@ -175,12 +175,14 @@
component_properties_free_func_ptrs, key, AXIS2_HASH_KEY_STRING);
if(!free_func_ptr)
{
- /* If free_func_ptr is NULL we assume that property is type
- * axis2_char_t *
+ /* If free_func_ptr is NULL we assume that property is of type
+ * axis2_char_t* (that is string)
*/
AXIS2_FREE((*env)->allocator, val);
}
- free_func_ptr(val, env);
+
+ /* TODO: commenting this for the time being. Should if AXIS2C-73 to solve the problem permanantly
+ free_func_ptr(val, env);*/
val = NULL;
key = NULL;
Modified: webservices/axis2/trunk/c/modules/xml/om/om_stax_builder.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/om_stax_builder.c?rev=378454&r1=378453&r2=378454&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/om_stax_builder.c (original)
+++ webservices/axis2/trunk/c/modules/xml/om/om_stax_builder.c Thu Feb 16 23:22:27 2006
@@ -791,11 +791,19 @@
if(builder_impl->parser)
{
AXIS2_XML_READER_FREE(builder_impl->parser, env);
+ builder_impl->parser = NULL;
+ }
+
+ if(builder_impl->document)
+ {
+ AXIS2_OM_DOCUMENT_FREE(builder_impl->document, env);
+ builder_impl->document = NULL;
}
if(builder->ops)
{
- AXIS2_FREE ((*env)->allocator,builder->ops);
+ AXIS2_FREE ((*env)->allocator, builder->ops);
+ builder->ops = NULL;
}
AXIS2_FREE ((*env)->allocator, AXIS2_INTF_TO_IMPL(builder));
return AXIS2_SUCCESS;
Modified: webservices/axis2/trunk/c/samples/client/math/math_client.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/samples/client/math/math_client.c?rev=378454&r1=378453&r2=378454&view=diff
==============================================================================
--- webservices/axis2/trunk/c/samples/client/math/math_client.c (original)
+++ webservices/axis2/trunk/c/samples/client/math/math_client.c Thu Feb 16 23:22:27 2006
@@ -135,6 +135,11 @@
{
AXIS2_OM_NODE_FREE_TREE(node, &env);
}
+
+ if (stub)
+ {
+ AXIS2_STUB_FREE(stub, &env);
+ }
return status;
}