Francois Gouget : winealsa.drv: Delete the g_sessions_lock critical section when unloading the dll.
Alexandre Julliard
julliard at winehq.org
Tue Nov 8 12:23:08 CST 2011
Module: wine
Branch: master
Commit: 9b55cc9e6fdd33c4c9a11ea21e0683b0952fe666
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9b55cc9e6fdd33c4c9a11ea21e0683b0952fe666
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Mon Nov 7 16:52:40 2011 +0100
winealsa.drv: Delete the g_sessions_lock critical section when unloading the dll.
---
dlls/winealsa.drv/mmdevdrv.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/dlls/winealsa.drv/mmdevdrv.c b/dlls/winealsa.drv/mmdevdrv.c
index 25693c0..bc1ca94 100644
--- a/dlls/winealsa.drv/mmdevdrv.c
+++ b/dlls/winealsa.drv/mmdevdrv.c
@@ -219,12 +219,19 @@ static inline SessionMgr *impl_from_IAudioSessionManager2(IAudioSessionManager2
BOOL WINAPI DllMain(HINSTANCE dll, DWORD reason, void *reserved)
{
- if(reason == DLL_PROCESS_ATTACH){
+ switch (reason)
+ {
+ case DLL_PROCESS_ATTACH:
g_timer_q = CreateTimerQueue();
if(!g_timer_q)
return FALSE;
- }
+ break;
+ case DLL_PROCESS_DETACH:
+ g_sessions_lock.DebugInfo->Spare[0] = 0;
+ DeleteCriticalSection(&g_sessions_lock);
+ break;
+ }
return TRUE;
}
More information about the wine-cvs
mailing list