1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-02-05 05:47:00 +03:00

Don't initialize SAX handler in htmlReadMemory

The SAX handler is already initialized when creating the parser
context.
This commit is contained in:
Nick Wellnhofer 2022-08-22 14:06:37 +02:00
parent 37cedc0b15
commit 80bd34c3c6

View File

@ -6995,9 +6995,6 @@ htmlReadMemory(const char *buffer, int size, const char *URL, const char *encodi
ctxt = htmlCreateMemoryParserCtxt(buffer, size);
if (ctxt == NULL)
return (NULL);
htmlDefaultSAXHandlerInit();
if (ctxt->sax != NULL)
memcpy(ctxt->sax, &htmlDefaultSAXHandler, sizeof(xmlSAXHandlerV1));
return (htmlDoRead(ctxt, URL, encoding, options, 0));
}