Free the debug info when making a critical section global.

This commit is contained in:
Alexandre Julliard 2003-08-18 20:03:00 +00:00
parent 140eb97eef
commit 1bfade140f
1 changed files with 5 additions and 0 deletions

View File

@ -94,6 +94,11 @@ void WINAPI MakeCriticalSectionGlobal( CRITICAL_SECTION *crit )
HANDLE sem = crit->LockSemaphore;
if (!sem) NtCreateSemaphore( &sem, SEMAPHORE_ALL_ACCESS, NULL, 0, 1 );
crit->LockSemaphore = ConvertToGlobalHandle( sem );
if (crit->DebugInfo)
{
RtlFreeHeap( GetProcessHeap(), 0, crit->DebugInfo );
crit->DebugInfo = NULL;
}
}