Author: damitha
Date: Sun Jan 6 22:26:49 2008
New Revision: 609521
URL: http://svn.apache.org/viewvc?rev=609521&view=rev
Log:
Fixing memory leaks
Modified:
webservices/sandesha/trunk/c/src/storage/beans/create_seq_bean.c
webservices/sandesha/trunk/c/src/storage/beans/sender_bean.c
webservices/sandesha/trunk/c/src/storage/sqlite/permanent_bean_mgr.c
webservices/sandesha/trunk/c/src/storage/sqlite/permanent_seq_property_mgr.c
webservices/sandesha/trunk/c/src/storage/sqlite/permanent_storage_mgr.c
webservices/sandesha/trunk/c/src/util/msg_retrans_adjuster.c
Modified: webservices/sandesha/trunk/c/src/storage/beans/create_seq_bean.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/beans/create_seq_bean.c?rev=609521&r1=609520&r2=609521&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/beans/create_seq_bean.c (original)
+++ webservices/sandesha/trunk/c/src/storage/beans/create_seq_bean.c Sun Jan 6
22:26:49 2008
@@ -122,6 +122,11 @@
AXIS2_FREE(env->allocator, create_seq_bean->seq_id);
create_seq_bean->seq_id= NULL;
}
+ if(create_seq_bean->create_seq_msg_store_key)
+ {
+ AXIS2_FREE(env->allocator,
create_seq_bean->create_seq_msg_store_key);
+ create_seq_bean->create_seq_msg_store_key = NULL;
+ }
if(create_seq_bean)
{
AXIS2_FREE(env->allocator, create_seq_bean);
Modified: webservices/sandesha/trunk/c/src/storage/beans/sender_bean.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/beans/sender_bean.c?rev=609521&r1=609520&r2=609521&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/beans/sender_bean.c (original)
+++ webservices/sandesha/trunk/c/src/storage/beans/sender_bean.c Sun Jan 6
22:26:49 2008
@@ -137,6 +137,11 @@
AXIS2_FREE(env->allocator, sender_bean->wsrm_anon_uri);
sender_bean->wsrm_anon_uri = NULL;
}
+ if(sender_bean->to_address)
+ {
+ AXIS2_FREE(env->allocator, sender_bean->to_address);
+ sender_bean->to_address = NULL;
+ }
if(sender_bean)
{
AXIS2_FREE(env->allocator, sender_bean);
Modified: webservices/sandesha/trunk/c/src/storage/sqlite/permanent_bean_mgr.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/sqlite/permanent_bean_mgr.c?rev=609521&r1=609520&r2=609521&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/sqlite/permanent_bean_mgr.c
(original)
+++ webservices/sandesha/trunk/c/src/storage/sqlite/permanent_bean_mgr.c Sun
Jan 6 22:26:49 2008
@@ -254,7 +254,6 @@
const axutil_env_t *env,
axis2_char_t *sql_stmt_remove)
{
- sandesha2_bean_mgr_args_t *args = NULL;
axis2_char_t *error_msg = NULL;
int rc = -1;
axutil_thread_mutex_lock(bean_mgr->mutex);
@@ -266,8 +265,6 @@
axutil_thread_mutex_unlock(bean_mgr->mutex);
return AXIS2_FALSE;
}
- args = AXIS2_MALLOC(env->allocator, sizeof(sandesha2_bean_mgr_args_t));
- args->env = env;
rc = sqlite3_exec(bean_mgr->dbconn, sql_stmt_remove, 0, 0, &error_msg);
if(rc == SQLITE_BUSY)
rc = sandesha2_permanent_bean_mgr_busy_handler(env,
Modified:
webservices/sandesha/trunk/c/src/storage/sqlite/permanent_seq_property_mgr.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/sqlite/permanent_seq_property_mgr.c?rev=609521&r1=609520&r2=609521&view=diff
==============================================================================
---
webservices/sandesha/trunk/c/src/storage/sqlite/permanent_seq_property_mgr.c
(original)
+++
webservices/sandesha/trunk/c/src/storage/sqlite/permanent_seq_property_mgr.c
Sun Jan 6 22:26:49 2008
@@ -260,6 +260,8 @@
sprintf(sql_insert, "insert into seq_property(id, seq_id, name, value) "\
"values('%s', '%s', '%s', '%s')", id, seq_id, name, value);
+ if(id)
+ AXIS2_FREE(env->allocator, id);
ret = sandesha2_permanent_bean_mgr_insert(seq_prop_mgr_impl->bean_mgr,
env,
sql_insert);
AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
@@ -352,6 +354,8 @@
sprintf(sql_update, "update seq_property set seq_id='%s', name='%s',"\
"value='%s' where id='%s'", seq_id, name, value, id);
+ if(id)
+ AXIS2_FREE(env->allocator, id);
ret = sandesha2_permanent_bean_mgr_update(seq_prop_mgr_impl->bean_mgr,
env,
sql_update);
AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
Modified:
webservices/sandesha/trunk/c/src/storage/sqlite/permanent_storage_mgr.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/sqlite/permanent_storage_mgr.c?rev=609521&r1=609520&r2=609521&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/sqlite/permanent_storage_mgr.c
(original)
+++ webservices/sandesha/trunk/c/src/storage/sqlite/permanent_storage_mgr.c Sun
Jan 6 22:26:49 2008
@@ -293,7 +293,6 @@
sandesha2_permanent_bean_mgr_update_msg_store_bean(storage_mgr_impl->bean_mgr,
env, msg_store_bean);
return AXIS2_SUCCESS;
-
}
axis2_status_t AXIS2_CALL
@@ -712,6 +711,8 @@
sandesha2_msg_store_bean_set_svr_side(bean, env,
axis2_msg_ctx_get_server_side(msg_ctx, env));
sandesha2_msg_store_bean_set_soap_envelope_str(bean, env, soap_str);
+ if(xml_writer)
+ axiom_xml_writer_free(xml_writer, env);
sandesha2_msg_store_bean_set_soap_version(bean, env, soap_version);
sandesha2_msg_store_bean_set_msg_id(bean, env, (axis2_char_t *)
axis2_msg_ctx_get_msg_id(msg_ctx, env));
@@ -923,6 +924,8 @@
sandesha2_permanent_bean_mgr_store_response(storage_mgr_impl->bean_mgr,
env, seq_id, response_str, msg_no, soap_version);
+ if(xml_writer)
+ axiom_xml_writer_free(xml_writer, env);
return AXIS2_SUCCESS;
}
Modified: webservices/sandesha/trunk/c/src/util/msg_retrans_adjuster.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/util/msg_retrans_adjuster.c?rev=609521&r1=609520&r2=609521&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/util/msg_retrans_adjuster.c (original)
+++ webservices/sandesha/trunk/c/src/util/msg_retrans_adjuster.c Sun Jan 6
22:26:49 2008
@@ -127,6 +127,8 @@
sender_mgr);
continue_sending = AXIS2_FALSE;
}
+ if(rm_msg_ctx)
+ sandesha2_msg_ctx_free(rm_msg_ctx, env);
AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
"[sandesha2]Exit:sandesha2_msg_retrans_adjuster_adjust_retrans");
return continue_sending;
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]