You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by "Samisa Abeysinghe (JIRA)" <ji...@apache.org> on 2006/11/13 03:05:37 UTC

[jira] Assigned: (AXIS2C-387) Memory leaks in operation caused by code blocks with no meaning

     [ http://issues.apache.org/jira/browse/AXIS2C-387?page=all ]

Samisa Abeysinghe reassigned AXIS2C-387:
----------------------------------------

    Assignee: Samisa Abeysinghe

> 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
>         Assigned To: 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