Andrew Talbot wrote:
@@ -299,7 +299,6 @@ static HRESULT WINAPI ProgressDialog_StartProgressDialog(IProgressDialog *iface, { ProgressDialog *This = (ProgressDialog *)iface; struct create_params params;
HANDLE hThread;
TRACE("(%p, %p, %x, %p)\n", iface, punkEnableModeless, dwFlags, reserved); if (punkEnableModeless || reserved)
@@ -321,7 +320,7 @@ static HRESULT WINAPI ProgressDialog_StartProgressDialog(IProgressDialog *iface, params.hwndParent = hwndParent; params.hEvent = CreateEventW(NULL, TRUE, FALSE, NULL);
- hThread = CreateThread(NULL, 0, dialog_thread, ¶ms, 0, NULL);
CreateThread(NULL, 0, dialog_thread, ¶ms, 0, NULL); WaitForSingleObject(params.hEvent, INFINITE);
This->hwndDisabledParent = NULL;
A correct fix is to call CloseHandle(hThread), otherwise the handle is leaked.
Robert Shearman wrote:
A correct fix is to call CloseHandle(hThread), otherwise the handle is leaked.
Thanks, Rob. I've sent a replacement patch entitled "browseui: Fix handle leak" to replace this.