From: Gabriel Ivăncescu gabrielopcode@gmail.com
Note that for the case when mozwindow_to_window returns an existing window, no ref is added to it anyway, so this is just leaking.
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/htmlframe.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/dlls/mshtml/htmlframe.c b/dlls/mshtml/htmlframe.c index e1b1562b0dc..38bb53dc551 100644 --- a/dlls/mshtml/htmlframe.c +++ b/dlls/mshtml/htmlframe.c @@ -48,9 +48,14 @@ static HRESULT set_frame_doc(HTMLFrameBase *frame, nsIDOMDocument *nsdoc) return E_FAIL;
window = mozwindow_to_window(mozwindow); - if(!window && frame->element.node.doc->browser) + if(!window && frame->element.node.doc->browser) { hres = create_outer_window(frame->element.node.doc->browser, mozwindow, frame->element.node.doc->outer_window, &window); + + /* Don't hold ref to the created window; the parent keeps ref to it */ + if(SUCCEEDED(hres)) + IHTMLWindow2_Release(&window->base.IHTMLWindow2_iface); + } mozIDOMWindowProxy_Release(mozwindow); if(FAILED(hres)) return hres;