Re: [xml] additional xmlFree needed in htmlSAXParseDoc?

On Wed, Aug 13, 2003 at 02:08:03PM +0200, kidman breaken de wrote:


I was stepping through and the code and were wondering about a little
In the function "htmlSAXParseDoc" in HTMLparser.c in line 5326 "sax" is
assigned to "ctxt->sax". Should the old sax be free'd before the new one
is assigned?

So the code would would look like this:

    if (sax != NULL) {
        if (ctxt->sax) xmlFree (ctxt->sax); 
        ctxt->sax = sax;
        ctxt->userData = userData;

  Seems right because it is allocated in the function htmlInitParserCtxt()

    Applied, thanks !


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]