# HG changeset patch
# User Nick Wellnhofer <wellnhofer@aevum.de>
# Date 1661169997 -7200
#      Mon Aug 22 14:06:37 2022 +0200
# Node ID ccce9ef71afc0069078fb992d04916763eb0db59
# Parent  c2f897fa73fb91ea5fde08f2a2f6ab07ff8fb254
Don't initialize SAX handler in htmlReadMemory

The SAX handler is already initialized when creating the parser
context.

diff --git a/HTMLparser.c b/HTMLparser.c
--- a/HTMLparser.c
+++ b/HTMLparser.c
@@ -6995,9 +6995,6 @@
     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));
 }