Author: damitha
Date: Sun Jan 27 09:26:36 2008
New Revision: 615618
URL: http://svn.apache.org/viewvc?rev=615618&view=rev
Log:
Fixing memory leaks
Modified:
webservices/sandesha/trunk/c/src/storage/sqlite/permanent_storage_mgr.c
webservices/sandesha/trunk/c/src/util/msg_creator.c
webservices/sandesha/trunk/c/src/util/sandesha2_utils.c
webservices/sandesha/trunk/c/src/wsrm/terminate_seq.c
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=615618&r1=615617&r2=615618&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 27 09:26:36 2008
@@ -789,9 +789,11 @@
sandesha2_msg_store_bean_set_action(bean, env, action);
prop_str = sandesha2_permanent_storage_mgr_get_property_string(env,
msg_ctx);
if (prop_str)
+ {
sandesha2_msg_store_bean_set_persistent_property_str(bean, env,
prop_str);
-
+ AXIS2_FREE(env->allocator, prop_str);
+ }
/* setting the request message if this a response message.*/
op_ctx = axis2_msg_ctx_get_op_ctx(msg_ctx, env);
if(op_ctx)
Modified: webservices/sandesha/trunk/c/src/util/msg_creator.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/util/msg_creator.c?rev=615618&r1=615617&r2=615618&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/util/msg_creator.c (original)
+++ webservices/sandesha/trunk/c/src/util/msg_creator.c Sun Jan 27 09:26:36 2008
@@ -918,6 +918,8 @@
seq_bean, env);
ack_range_list = sandesha2_utils_get_ack_range_list(env, msg_no_list,
rm_ns_value);
+ if(seq_bean)
+ sandesha2_seq_property_bean_free(seq_bean, env);
if(ack_range_list)
size = axutil_array_list_size(ack_range_list, env);
for(i = 0; i < size; i++)
@@ -927,6 +929,8 @@
ack_range = axutil_array_list_get(ack_range_list, env, i);
sandesha2_seq_ack_add_ack_range(seq_ack, env, ack_range);
}
+ if(ack_range_list)
+ axutil_array_list_free(ack_range_list, env);
seq_closed_bean = sandesha2_seq_property_mgr_retrieve(seq_prop_mgr, env,
seq_id,
SANDESHA2_SEQ_PROP_SEQ_CLOSED);
if(seq_closed_bean)
@@ -946,6 +950,8 @@
sandesha2_seq_ack_set_ack_final(seq_ack, env, ack_final);
}
}
+ if(seq_closed_bean)
+ sandesha2_seq_property_bean_free(seq_closed_bean, env);
sandesha2_msg_ctx_set_seq_ack(app_msg, env, seq_ack);
soap_header = axiom_soap_envelope_get_header(envelope, env);
sandesha2_seq_ack_to_om_node(seq_ack, env, soap_header);
Modified: webservices/sandesha/trunk/c/src/util/sandesha2_utils.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/util/sandesha2_utils.c?rev=615618&r1=615617&r2=615618&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/util/sandesha2_utils.c (original)
+++ webservices/sandesha/trunk/c/src/util/sandesha2_utils.c Sun Jan 27 09:26:36
2008
@@ -995,7 +995,10 @@
axutil_array_list_add(ack_ranges, env, ack_range);
completed = AXIS2_TRUE;
}
- /*axutil_array_list_free(sorted_msg_no_list, env);*/
+ if(sorted_msg_no_list)
+ {
+ axutil_array_list_free(sorted_msg_no_list, env);
+ }
return ack_ranges;
}
@@ -1022,7 +1025,10 @@
temp_str = strtok(NULL, delim);
}
sorted_msg_no_list = sandesha2_utils_sort(env, msg_numbers);
- /*axutil_array_list_free(msg_numbers, env);*/
+ if(msg_numbers)
+ {
+ axutil_array_list_free(msg_numbers, env);
+ }
AXIS2_FREE(env->allocator, dup_str);
return sorted_msg_no_list;
}
Modified: webservices/sandesha/trunk/c/src/wsrm/terminate_seq.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/wsrm/terminate_seq.c?rev=615618&r1=615617&r2=615618&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/wsrm/terminate_seq.c (original)
+++ webservices/sandesha/trunk/c/src/wsrm/terminate_seq.c Sun Jan 27 09:26:36
2008
@@ -83,7 +83,11 @@
AXIS2_FREE(env->allocator, terminate_seq->ns_val);
terminate_seq->ns_val = NULL;
}
- terminate_seq->identifier = NULL;
+ if(terminate_seq->identifier)
+ {
+ sandesha2_identifier_free(terminate_seq->identifier, env);
+ terminate_seq->identifier = NULL;
+ }
AXIS2_FREE(env->allocator, terminate_seq);
return AXIS2_SUCCESS;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]