Return-Path: Delivered-To: apmail-ws-axis-c-dev-archive@www.apache.org Received: (qmail 70394 invoked from network); 6 Nov 2006 06:36:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Nov 2006 06:36:01 -0000 Received: (qmail 75700 invoked by uid 500); 6 Nov 2006 06:36:12 -0000 Delivered-To: apmail-ws-axis-c-dev-archive@ws.apache.org Received: (qmail 75589 invoked by uid 500); 6 Nov 2006 06:36:11 -0000 Mailing-List: contact axis-c-dev-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: "Apache AXIS C Developers List" Reply-To: "Apache AXIS C Developers List" Delivered-To: mailing list axis-c-dev@ws.apache.org Received: (qmail 75578 invoked by uid 99); 6 Nov 2006 06:36:11 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Nov 2006 22:36:11 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Nov 2006 22:35:59 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id EE2B871430F for ; Sun, 5 Nov 2006 22:35:38 -0800 (PST) Message-ID: <14709049.1162794938972.JavaMail.jira@brutus> Date: Sun, 5 Nov 2006 22:35:38 -0800 (PST) From: "Damitha Kumarage (JIRA)" To: axis-c-dev@ws.apache.org Subject: [jira] Commented: (AXIS2C-387) Memory leaks in operation caused by code blocks with no meaning In-Reply-To: <13839067.1162764976486.JavaMail.root@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ http://issues.apache.org/jira/browse/AXIS2C-387?page=comments#action_12447375 ] Damitha Kumarage commented on AXIS2C-387: ----------------------------------------- It may be true that this code block is causing memory leaks. But it has a meaning. If you see more carefully this is how message out and message processing phases are added as operation specific phases. I don't see these phases are used anywhere in our code. If we are never going to use these then it is reasonable to remove this code block. Otherwise memory leak has to be fixed > 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: axis-c-dev-unsubscribe@ws.apache.org For additional commands, e-mail: axis-c-dev-help@ws.apache.org