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 Veillard      | Red Hat Network
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]