mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-01 09:50:52 +00:00
windows.media.speech: Fix memory leak on error path in session_worker_thread_cb (scan-build).
This commit is contained in:
parent
6ac82b2a24
commit
adccd96c2b
1 changed files with 2 additions and 1 deletions
|
@ -193,7 +193,7 @@ static DWORD CALLBACK session_worker_thread_cb( void *args )
|
||||||
struct session *impl = impl_from_ISpeechContinuousRecognitionSession(iface);
|
struct session *impl = impl_from_ISpeechContinuousRecognitionSession(iface);
|
||||||
BOOLEAN running = TRUE, paused = FALSE;
|
BOOLEAN running = TRUE, paused = FALSE;
|
||||||
UINT32 frame_count, tmp_buf_size;
|
UINT32 frame_count, tmp_buf_size;
|
||||||
BYTE *audio_buf, *tmp_buf;
|
BYTE *audio_buf, *tmp_buf = NULL;
|
||||||
DWORD flags, status;
|
DWORD flags, status;
|
||||||
HANDLE events[2];
|
HANDLE events[2];
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
@ -285,6 +285,7 @@ static DWORD CALLBACK session_worker_thread_cb( void *args )
|
||||||
|
|
||||||
error:
|
error:
|
||||||
ERR("The recognition session worker encountered a serious error and needs to stop. hr: %lx.\n", hr);
|
ERR("The recognition session worker encountered a serious error and needs to stop. hr: %lx.\n", hr);
|
||||||
|
free(tmp_buf);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue