16 Jan
2023
16 Jan
'23
4:20 p.m.
Jinoh Kang (@iamahuman) commented about dlls/windows.media.speech/recognizer.c:
+ impl->worker_running = TRUE; + if (!(impl->worker_thread = CreateThread(NULL, 0, session_worker_thread_cb, impl, 0, NULL))) + { + hr = HRESULT_FROM_WIN32(GetLastError()); + impl->worker_running = FALSE; + } + impl->recognizer_state = SpeechRecognizerState_Capturing; + } + else + invalid_state = TRUE; + LeaveCriticalSection(&impl->cs); + + if (invalid_state && SUCCEEDED(hr)) + hr = COR_E_INVALIDOPERATION; + + return hr; You should release `*action` and set it to `NULL` on failure.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/1948#note_21051