Re: [xml] Memleak in xmlNewReference

On Fri, Feb 01, 2008 at 03:49:35PM +0100, Ralf Junker wrote:
Hello Daniel Veillard,

 That doesn't seems the right approach, by freeing cur, there you
change the semantic of the API, that doesn't look good to me. What should
be done instead is check the return value of xmlAddChild() and if NULL
then free the node in the caller. I think that call is done in SAX2.c
at the end of xmlSAX2Reference() . I made that change and the leak is indeed
fixed, I will commit this to SVN later.

Did you already commit your fix to SVN? I did not see it when I checked the last time.

  I had fixed it locally but forgot to commit it. It's in SVN now !



Red Hat Virtualization group
Daniel Veillard      | virtualization library
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]