From d9da6e642e1ba85e302eec659f08970ee88a881d Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Thu, 28 Mar 2019 15:56:36 +0100 Subject: [PATCH] mshtml: Move detach_document_node call to HTMLDocumentNode_unlink. Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- dlls/mshtml/htmldoc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index 656acaf263e..5b14678a6f2 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -4966,7 +4966,8 @@ static void HTMLDocumentNode_destructor(HTMLDOMNode *iface) { HTMLDocumentNode *This = impl_from_HTMLDOMNode(iface); - detach_document_node(This); + TRACE("(%p)\n", This); + heap_free(This->event_vector); ConnectionPointContainer_Destroy(&This->basedoc.cp_container); } @@ -4994,6 +4995,7 @@ static void HTMLDocumentNode_unlink(HTMLDOMNode *iface) nsIDOMHTMLDocument *nsdoc = This->nsdoc; release_document_mutation(This); + detach_document_node(This); This->nsdoc = NULL; nsIDOMHTMLDocument_Release(nsdoc); This->window = NULL;