mshtml: Increment ref count in QI(IID_HTMLPluginContainer) call.

This commit is contained in:
Jacek Caban 2015-04-13 13:26:26 +02:00 committed by Alexandre Julliard
parent 8fff427bc0
commit 81c13caf37
2 changed files with 6 additions and 1 deletions

View File

@ -658,8 +658,10 @@ static HRESULT HTMLObjectElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
TRACE("(%p)->(IID_IHTMLObjectElement2 %p)\n", This, ppv);
*ppv = &This->IHTMLObjectElement2_iface;
}else if(IsEqualGUID(&IID_HTMLPluginContainer, riid)) {
/* Special pseudo-interface returning HTMLPluginContainse struct. */
TRACE("(%p)->(IID_HTMLPluginContainer %p)\n", This, ppv);
*ppv = &This->plugin_container;
node_addref(&This->plugin_container.element.node);
return S_OK;
}else {
HRESULT hres;

View File

@ -1509,8 +1509,11 @@ void bind_event_scripts(HTMLDocumentNode *doc)
else
bind_node_event(doc, event_target, target_node, event, event_disp);
if(target_node)
if(target_node) {
IHTMLDOMNode_Release(&target_node->IHTMLDOMNode_iface);
if(plugin_container)
node_release(&plugin_container->element.node);
}
}
heap_free(event);