Re: [xml] after xpath search, xmlXPathFreeObject() can generate segfault

On Fri, Jan 09, 2004 at 09:58:58AM -0800, Christopher J. Grayce wrote:
The problem occurs when I clean up after the XPath query and tree modification.
The problem is a segfault in xmlXPathFreeObject() when it is asked to free
up the memory used in the XPath query.

The reason for the segfault is that xmlXPathFreeObject() assumes that the
pointers in the object which it is asked to free are either zero or still

  Then keep track of the nodes you want to delete, then free the XPath 
object and only then free the tree objects.
  Duplicating tree informations in the XPath objects doesn't sound a good


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]