Skip Menu |

This queue is for tickets about the XML-LibXML CPAN distribution.

Report information
The Basics
Id: 38028
Status: resolved
Priority: 0/
Queue: XML-LibXML

People
Owner: Nobody in particular
Requestors: tokuhirom+cpan [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: (no value)
Fixed in: (no value)



Subject: getChildrenByTagNameNS cause memory leaks
getChildrenByTagNameNS cause memory leaks. my libxml version is 2.6.27. leak code is here: use strict; use warnings; use XML::LibXML; my $doc = XML::LibXML::Document->new('1.0', 'utf8'); while(1) { my $title = $doc->createElement('title'); $title->getChildrenByTagNameNS('http://purl.org/atom/ns#', 'title'); } patch is here: --- LibXML.xs.orig 2008-07-30 08:49:37.000000000 +0900 +++ LibXML.xs 2008-07-30 08:53:12.000000000 +0900 @@ -4205,6 +4205,8 @@ if ( wantarray == G_SCALAR ) { XPUSHs(sv_2mortal(newSViv(len)) ); } + xmlFree(name); + xmlFree(nsURI); SV* firstChild( self ) regards.
This issue is already fixed in the SVN. -- Petr