[ http://issues.apache.org/jira/browse/AXIS2C-387?page=comments#action_12449091 ] Samisa Abeysinghe commented on AXIS2C-387: ------------------------------------------
The flow in message is never used in C implementation. Also, if they are operation specific phases, but are created in the operation constructor, they are no different to the global phases. I commented out these code blocks and it does not have any side effect on any of the samples, meaning that these code blocks are useless. So I am going to remove them. > Memory leaks in operation caused by code blocks with no meaning > --------------------------------------------------------------- > > Key: AXIS2C-387 > URL: http://issues.apache.org/jira/browse/AXIS2C-387 > Project: Axis2-C > Issue Type: Bug > Components: core/description > Affects Versions: 0.95 > Reporter: Samisa Abeysinghe > Priority: Trivial > > The following code blocks in op.c makes no sence, they are not needed and > causes memory leaks as well. > As you may notice, the phase created is added to a list, which is a local > variable that is never used. > Hence the code does infact do nothing. > message_processing = axis2_phase_create(env, AXIS2_PHASE_MESSAGE_PROCESSING); > if (op_impl->base) > { > axis2_msg_t *msg = NULL; > msg = AXIS2_DESC_GET_CHILD(op_impl->base, env, AXIS2_MSG_IN); > if (msg) > { > axis2_array_list_t *list = AXIS2_MSG_GET_FLOW(msg, env); > if (list) > { > status = AXIS2_ARRAY_LIST_ADD(list, env, > message_processing); > } > else > { > status = AXIS2_FAILURE; > } > } > } > if (AXIS2_SUCCESS != status) > { > AXIS2_PHASE_FREE(message_processing, env); > message_processing = NULL; > return NULL; > } > message_processing = NULL; > message_out = axis2_phase_create(env, AXIS2_PHASE_MESSAGE_OUT); > if (op_impl->base) > { > axis2_msg_t *msg = NULL; > msg = AXIS2_DESC_GET_CHILD(op_impl->base, env, AXIS2_MSG_OUT); > if (msg) > { > axis2_array_list_t *list = AXIS2_MSG_GET_FLOW(msg, env); > if (list) > { > status = AXIS2_ARRAY_LIST_ADD(list, env, > message_out); > } > else > { > status = AXIS2_FAILURE; > } > } > } > if (AXIS2_SUCCESS != status) > { > AXIS2_PHASE_FREE(message_out, env); > message_out = NULL; > return NULL; > } > message_out = NULL; -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
