From d42f65b7f8331a227dc11e8297e5fd473377490c Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Tue, 27 Oct 2009 12:19:33 +0000 Subject: [PATCH] - Fix a heap corruption at process shutdown - Found by irc:encoded svn path=/trunk/; revision=43791 --- reactos/dll/win32/winmm/winmm.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/reactos/dll/win32/winmm/winmm.c b/reactos/dll/win32/winmm/winmm.c index 2a1c7059ffd..9eb9b7b89b2 100644 --- a/reactos/dll/win32/winmm/winmm.c +++ b/reactos/dll/win32/winmm/winmm.c @@ -65,13 +65,7 @@ HINSTANCE hWinMM32Instance; HANDLE psLastEvent; HANDLE psStopEvent; -static CRITICAL_SECTION_DEBUG critsect_debug = -{ - 0, 0, &WINMM_cs, - { &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList }, - 0, 0, { (DWORD_PTR)(__FILE__ ": WINMM_cs") } -}; -CRITICAL_SECTION WINMM_cs = { &critsect_debug, -1, 0, 0, 0, 0 }; +CRITICAL_SECTION WINMM_cs; /************************************************************************** * WINMM_CreateIData [internal] @@ -81,6 +75,7 @@ static BOOL WINMM_CreateIData(HINSTANCE hInstDLL) hWinMM32Instance = hInstDLL; psStopEvent = CreateEventW(NULL, TRUE, FALSE, NULL); psLastEvent = CreateEventW(NULL, TRUE, FALSE, NULL); + InitializeCriticalSection(&WINMM_cs); return TRUE; } -- 2.17.1