mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-10-15 23:43:55 +00:00
winwave: close event handle and delete wait object after closing HWAVEOUT
To avoid possibly being called back and thus racing. Signed-off-by: malc <av1474@comtv.ru>
This commit is contained in:
parent
f4e8d0b737
commit
875ef647b0
|
@ -263,6 +263,8 @@ static void winwave_fini_out (HWVoiceOut *hw)
|
||||||
{
|
{
|
||||||
WaveVoiceOut *wave = (WaveVoiceOut *) hw;
|
WaveVoiceOut *wave = (WaveVoiceOut *) hw;
|
||||||
|
|
||||||
|
winwave_anal_close_out (wave);
|
||||||
|
|
||||||
if (wave->event) {
|
if (wave->event) {
|
||||||
qemu_del_wait_object (wave->event, winwave_poll_out, wave);
|
qemu_del_wait_object (wave->event, winwave_poll_out, wave);
|
||||||
if (!CloseHandle (wave->event)) {
|
if (!CloseHandle (wave->event)) {
|
||||||
|
@ -271,8 +273,6 @@ static void winwave_fini_out (HWVoiceOut *hw)
|
||||||
wave->event = NULL;
|
wave->event = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
winwave_anal_close_out (wave);
|
|
||||||
|
|
||||||
qemu_free (wave->pcm_buf);
|
qemu_free (wave->pcm_buf);
|
||||||
wave->pcm_buf = NULL;
|
wave->pcm_buf = NULL;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue