Re: [xml] xmlParseFile, does this allocate memory?

On Wed, Jul 21, 2004 at 04:54:42PM -0600, Grant Schoep wrote:
Ah.. I just noticed they relased a new patch to valgrind(2.1.2) grabbed
that and it no longer reports a leak on that call in  libxml2. So
chances are it was just a bug with valgrind in this case.

Am I correct to asume I do not need to call xmlFreeDoc on the xmlDocPtr
that xmlParseFile returns?

 Wrong. you need to. All examples on-line does this, and your new valgrind
is just broken.


Daniel Veillard      | Red Hat Desktop team
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]