Re: [xml] possible bug and patch



On Thu, Aug 22, 2002 at 02:18:55PM -0400, Jason Adams wrote:
hi

I was looking at the source for "xmlXPathRegisterNs" and it's related 
functions to get an idea of how they worked when I noticed something odd 
in the memory management. "xmlXPathRegisterNs" passes "xmlFree" on to 
"xmlHashUpdateEntry" but it doesn't allocate anything. Also 
"xmlXPathRegisteredNsCleanup" doesn pass a deallocation routine to 
"xmlHashFree".

I believe the attached patch should fix it. I haven't really tested it 
apart from seeing if "make check" died.

  Yep sounds logical, I'm surprized though because I always check for memory
leaks, it seems xmlXPathRegisterNs is simply not used in the regression tests.

  thanks, applied !

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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