axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Senaka Fernando (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (AXIS2C-873) Function axiom_document_build_all[Alastair FETTES]
Date Fri, 04 Jan 2008 05:10:34 GMT

    [ https://issues.apache.org/jira/browse/AXIS2C-873?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12555799#action_12555799
] 

senakafdo edited comment on AXIS2C-873 at 1/3/08 9:10 PM:
----------------------------------------------------------------

Hi Alastair & Lahiru,

+1 for pointing this out. This is documented AFAIK. In the axiom_document_free_self method
it is noted that, it only frees itself and not the associated axiom structure. I think it
is sufficient. Isn't it? This should go into the om_tutorial may be on how we could use these
methods.

Regards,
Senaka.

      was (Author: senakafdo):
    Hi Alastair & Lahiru,

+1 for pointing this out. We must document this 2 avoid possible leak. Parameters don't require
a mention however, only the return value matters.

Regards,
Senaka.
  
> Function axiom_document_build_all[Alastair FETTES]
> --------------------------------------------------
>
>                 Key: AXIS2C-873
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-873
>             Project: Axis2-C
>          Issue Type: Bug
>    Affects Versions: Current (Nightly)
>         Environment: Ubuntu 7.04
>            Reporter: Lahiru Gunathilake
>             Fix For: Current (Nightly)
>
>
> <snippet>
> AXIS2_EXTERN
> axiom_node_t* axiom_document_build_all(
>       struct axiom_document*     document,
>       const axutil_env_t*        env)
> </snippet>
> Problem: The caller of this function is not given responsibility for the return value
of type axiom_node_t*, since (as of v1.1.0) the return value is free-ed by the function axiom_document_free.
If the caller calls the function axiom_document_free_self, the return value is NOT free-ed.
So a memory leak is possible here.
> Solution: Document memory ownership for parameters and return value.  Investigate the
use of free functions and pointers in regards to possible memory leak.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


Mime
View raw message