Jacek Caban : dsound: Close sleepev handle after releasing audio client.

Alexandre Julliard julliard at winehq.org
Mon Nov 26 16:20:12 CST 2018


Module: wine
Branch: master
Commit: 158a2c96cc4044f8cb2f63686ebde6b5f59e747e
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=158a2c96cc4044f8cb2f63686ebde6b5f59e747e

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Mon Nov 26 17:33:27 2018 +0100

dsound: Close sleepev handle after releasing audio client.

It's used as audio client event handle, so it shouldn't be closed as
long as audio client is alive.

Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/dsound/dsound.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/dsound/dsound.c b/dlls/dsound/dsound.c
index 6a49d63..12f1e28 100644
--- a/dlls/dsound/dsound.c
+++ b/dlls/dsound/dsound.c
@@ -207,7 +207,6 @@ static ULONG DirectSoundDevice_Release(DirectSoundDevice * device)
             CloseHandle(device->thread);
             CloseHandle(device->thread_finished);
         }
-        CloseHandle(device->sleepev);
 
         EnterCriticalSection(&DSOUND_renderers_lock);
         list_remove(&device->entry);
@@ -234,6 +233,7 @@ static ULONG DirectSoundDevice_Release(DirectSoundDevice * device)
             IAudioStreamVolume_Release(device->volume);
         if(device->mmdevice)
             IMMDevice_Release(device->mmdevice);
+        CloseHandle(device->sleepev);
         HeapFree(GetProcessHeap(), 0, device->tmp_buffer);
         HeapFree(GetProcessHeap(), 0, device->cp_buffer);
         HeapFree(GetProcessHeap(), 0, device->buffer);




More information about the wine-cvs mailing list