[xml] additional xmlFree needed in htmlSAXParseDoc?



Hello!

I was stepping through and the code and were wondering about a little
thig.
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;
    }

So long
Oliver



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]