MrLoick / staff

Automatically exported from code.google.com/p/staff
Apache License 2.0
0 stars 0 forks source link

Memory leak in FromString() #217

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Compile the sample
2.Run it with valgrind --leak-check=full

What is the expected output? What do you see instead?
The stax_builder is not being freed. 

Please use labels and text to provide additional information.
Using r791.

Looking at the issue it seems that the only thing necessary is freeing the 
stax_builder...
I propose 2 possible fixes:
- just freeing the stax_builder,
- modifying the way the node is created to let axis administer the builder, and 
avoid unnecesary code

Which would be the best of those solutions?

Original issue reported on code.google.com by alexmantaut on 23 Aug 2013 at 7:52

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by alexmantaut on 23 Aug 2013 at 7:53

GoogleCodeExporter commented 8 years ago
I know about this issue, it's not critical, because FromString is never used 
inside Staff and used for debugging purposes only. I faced with it when 
developed FromString function (in ages of Axis2/C-0.96 and Staff that was 
before google code) and didn't found any method to fix that leak, because 
`axiom_stax_builder_free` causes SIGSEGV.

Thank you for finding that, I didn't know about `axiom_stax_builder_free_self`.

As I remember previous versions of Axis2/C does not have 
`axiom_node_create_from_buffer`, It's good to don't break back compatibility.

Please commit first patch with adding the same line into previous catch(...).

Original comment by loentar on 25 Aug 2013 at 5:32

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r792.

Original comment by alexmantaut on 26 Aug 2013 at 12:38