Module: wine Branch: master Commit: 5c939222d339f02264f92183a973d4471c495425 URL: https://gitlab.winehq.org/wine/wine/-/commit/5c939222d339f02264f92183a973d44... Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Mon May 22 19:03:22 2023 +0300 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(a)gmail.com> --- dlls/mshtml/pluginhost.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dlls/mshtml/pluginhost.c b/dlls/mshtml/pluginhost.c index 4ee5c37de19..83ce9aa5d7f 100644 --- a/dlls/mshtml/pluginhost.c +++ b/dlls/mshtml/pluginhost.c @@ -2672,14 +2672,15 @@ void detach_plugin_host(PluginHost *host) release_plugin_ifaces(host); + 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); } - - list_remove(&host->entry); - list_init(&host->entry); - host->doc = NULL; } HRESULT create_plugin_host(HTMLDocumentNode *doc, HTMLPluginContainer *container)