mshtml: Release ref from the element when detaching the plugin host.

When the plugin host is created, its only ref is being held by the element
it is associated with.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
This commit is contained in:
Gabriel Ivăncescu 2023-05-22 19:03:22 +03:00 committed by Alexandre Julliard
parent 08dc691dfb
commit 5c939222d3

View file

@ -2672,14 +2672,15 @@ void detach_plugin_host(PluginHost *host)
release_plugin_ifaces(host);
if(host->element) {
host->element->plugin_host = NULL;
host->element = NULL;
}
list_remove(&host->entry);
list_init(&host->entry);
host->doc = NULL;
if(host->element) {
host->element->plugin_host = NULL;
host->element = NULL;
IOleClientSite_Release(&host->IOleClientSite_iface);
}
}
HRESULT create_plugin_host(HTMLDocumentNode *doc, HTMLPluginContainer *container)