Author: janderwald
Date: Tue Oct 27 13:19:33 2009
New Revision: 43791
URL:
http://svn.reactos.org/svn/reactos?rev=43791&view=rev
Log:
- Fix a heap corruption at process shutdown
- Found by irc:encoded
Modified:
trunk/reactos/dll/win32/winmm/winmm.c
Modified: trunk/reactos/dll/win32/winmm/winmm.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winmm/winmm.c?re…
==============================================================================
--- trunk/reactos/dll/win32/winmm/winmm.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/winmm/winmm.c [iso-8859-1] Tue Oct 27 13:19:33 2009
@@ -65,13 +65,7 @@
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 @@
hWinMM32Instance = hInstDLL;
psStopEvent = CreateEventW(NULL, TRUE, FALSE, NULL);
psLastEvent = CreateEventW(NULL, TRUE, FALSE, NULL);
+ InitializeCriticalSection(&WINMM_cs);
return TRUE;
}