Re: [xml] xmlFreeNs bug?



On Fri, Jun 28, 2002 at 02:04:11PM +0200, Marcel Hoyer wrote:
pxDoc = xmlNewDoc ("1.0");
pxDoc->children = xmlNewDocNode (pxDoc, 0, "Dummy", 0);

pxNS = xmlNewNs (pxDoc->children, "uri://test", "testprfx");

xmlFreeNs (pxNS);
xmlFreeDoc (pxDoc);

  xmlNewNs adds the namespace declaration to the node. When freeing
the document it's recursive and it free the namespace too. You're
double freeing obviously !

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]