ole32: Delete the compobj and rpc static critical sections when unloading the dll.
Francois Gouget
fgouget at codeweavers.com
Thu Nov 17 02:53:19 CST 2011
---
dlls/ole32/compobj.c | 3 +++
dlls/ole32/rpc.c | 2 ++
2 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c
index 28e5da1..4579f0a 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 35971e0..c336743 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 */
--
1.7.7.1
More information about the wine-patches
mailing list