ole32: Delete the compobj and rpc static critical sections when unloading the dll.

This commit is contained in:
Francois Gouget 2011-11-17 09:53:19 +01:00 committed by Alexandre Julliard
parent a3e2c68f98
commit ed03674bc3
2 changed files with 5 additions and 0 deletions

View File

@ -308,6 +308,7 @@ static void COMPOBJ_DllList_Free(void)
HeapFree(GetProcessHeap(), 0, entry);
}
LeaveCriticalSection(&csOpenDllList);
DeleteCriticalSection(&csOpenDllList);
}
/******************************************************************************
@ -4286,6 +4287,8 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
COMPOBJ_UninitProcess();
RPC_UnregisterAllChannelHooks();
COMPOBJ_DllList_Free();
DeleteCriticalSection(&csRegisteredClassList);
DeleteCriticalSection(&csApartment);
break;
case DLL_THREAD_DETACH:

View File

@ -453,6 +453,8 @@ void RPC_UnregisterAllChannelHooks(void)
LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, &channel_hooks, struct channel_hook_entry, entry)
HeapFree(GetProcessHeap(), 0, cursor);
LeaveCriticalSection(&csChannelHook);
DeleteCriticalSection(&csChannelHook);
DeleteCriticalSection(&csRegIf);
}
/* RPC Channel Buffer Functions */