[Axl] [BUG] small memory leak

Francis Brosnan Blazquez francis at aspl.es
Mon Aug 10 13:38:55 CEST 2009


> Hello,

Hi Benoit,

> I believe there is a small memory leak in axl.
> Some of my code is doing this:
> 
> axlNode* doc  = axl_doc_parse(my_xml_data, -1, NULL);
> axlNode* root = axl_doc_get_root(doc);
> axl_node_set_name(root, "my_name");
> [ ... ] manipulate doc furthermore and dump it to text
> axl_doc_free(doc);
> 
> 
> The attached patch fix my memory leak, but I'm not completely sure.

It's a bug inside axl_node_set_name. I've checked the patch against
regression test and looks good.

> if the patch is good, could it be committed to SVN please ?

Sure, it is now committed. Thanks Benoit!

> Thank you,
> Benoît AMIAUX
> 
-- 
Francis Brosnan Blazquez <francis at aspl.es>
ASPL



More information about the Axl mailing list