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 Sahan Gamage <sa...@wso2.com> on 2005/12/05 11:51:23 UTC
[Axis2] memory leak fix in axis2_libxml2_writer_wrapper
I have fixed a memory leak in the axis2_libxml2_writer_wrapper.c
Please apply the following patch.
- Sahan
Re: [Axis2] memory leak fix in axis2_libxml2_writer_wrapper
Posted by Samisa Abeysinghe <sa...@gmail.com>.
Patch applied.
Thanks for the patch.
Samisa...
Sahan Gamage wrote:
> I have fixed a memory leak in the axis2_libxml2_writer_wrapper.c
> Please apply the following patch.
>
> - Sahan
>
>------------------------------------------------------------------------
>
>Index: parser/libxml2/src/axis2_libxml2_writer_wrapper.c
>===================================================================
>--- parser/libxml2/src/axis2_libxml2_writer_wrapper.c (revision 354019)
>+++ parser/libxml2/src/axis2_libxml2_writer_wrapper.c (working copy)
>@@ -541,6 +541,7 @@
> AXIS2_FREE((*env)->allocator, writer_impl->qname_array.uri);
> writer_impl->qname_array.prefix = NULL;
> writer_impl->qname_array.prefix = NULL;
>+
>
> if(writer->ops)
> {
>@@ -1390,11 +1391,14 @@
> strlen((const axis2_char_t*)(writer_impl->buffer->content))+1));
> sprintf(output,
> ((const axis2_char_t*)(writer_impl->buffer->content)));
>+ xmlBufferFree(writer_impl->buffer);
>+ writer_impl->buffer = NULL;
> }
> }
> else if(writer_impl->writer_type == AXIS2_LIBXML2_WRITER_FILE)
> {
> printf(" This is not supported for this type of writer");
> }
>+
> return output;
>-}
>\ No newline at end of file
>+}
>
>
Re: [Axis2] more memory leak fixes
Posted by Samisa Abeysinghe <sa...@gmail.com>.
Patch applied.
This is fantastic: I get 0 leaks with vlagrind test using libxml:
==12913== LEAK SUMMARY:
==12913== definitely lost: 0 bytes in 0 blocks.
==12913== possibly lost: 0 bytes in 0 blocks.
==12913== still reachable: 870 bytes in 20 blocks.
==12913== suppressed: 0 bytes in 0 blocks
Many thanks for the patch.
Samisa...
Sahan Gamage wrote:
> Hi,
>
> I have fixed a memory leak in the axis2_om_element.c.
> Please apply the patch and commit the code.
>
> - Sahan
>
>------------------------------------------------------------------------
>
>Index: om/src/axis2_om_element.c
>===================================================================
>--- om/src/axis2_om_element.c (revision 354357)
>+++ om/src/axis2_om_element.c (working copy)
>@@ -318,6 +318,7 @@
> (axis2_om_namespace_t *) (ns), env),uri) == 0)
> {
>
>+ AXIS2_FREE ((*env)->allocator, hashindex);
> return (axis2_om_namespace_t *) (ns);
> }
> }
>@@ -428,6 +429,7 @@
> if (AXIS2_STRCMP(AXIS2_OM_NAMESPACE_GET_URI(
> (axis2_om_namespace_t *)(ns), env), uri) == 0)
> {
>+ AXIS2_FREE ((*env)->allocator, hash_index);
> return (axis2_om_namespace_t *) (ns);
> }
> }
>
>
[Axis2] more memory leak fixes
Posted by Sahan Gamage <sa...@wso2.com>.
Hi,
I have fixed a memory leak in the axis2_om_element.c.
Please apply the patch and commit the code.
- Sahan