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
+}

Reply via email to