From ed03674bc30e9a4d01c3b921ca4032a4711dd3bc Mon Sep 17 00:00:00 2001 From: Francois Gouget Date: Thu, 17 Nov 2011 09:53:19 +0100 Subject: [PATCH] ole32: Delete the compobj and rpc static critical sections when unloading the dll. --- dlls/ole32/compobj.c | 3 +++ dlls/ole32/rpc.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c index 28e5da153d1..4579f0a0f76 100644 --- a/dlls/ole32/compobj.c +++ b/dlls/ole32/compobj.c @@ -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: diff --git a/dlls/ole32/rpc.c b/dlls/ole32/rpc.c index 35971e0e2bc..c33674364cf 100644 --- a/dlls/ole32/rpc.c +++ b/dlls/ole32/rpc.c @@ -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 */ -- 2.11.4.GIT