Rob Shearman : ole32: Free the memory associated with the open DLL list on unloading of ole32.
Alexandre Julliard
julliard at winehq.org
Mon Nov 12 06:27:22 CST 2007
Module: wine
Branch: master
Commit: 433639f783b3b36f708a0283f70fe137198b92bb
URL: http://source.winehq.org/git/wine.git/?a=commit;h=433639f783b3b36f708a0283f70fe137198b92bb
Author: Rob Shearman <rob at codeweavers.com>
Date: Sat Nov 10 16:06:35 2007 +0000
ole32: Free the memory associated with the open DLL list on unloading of ole32.
---
dlls/ole32/compobj.c | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c
index 4bd8e81..154ebc5 100644
--- a/dlls/ole32/compobj.c
+++ b/dlls/ole32/compobj.c
@@ -965,6 +965,21 @@ static void COMPOBJ_DllList_ReleaseRef(OpenDll *entry, BOOL free_entry)
}
}
+/* frees memory associated with active dll list */
+static void COMPOBJ_DllList_Free(void)
+{
+ OpenDll *entry, *cursor2;
+ EnterCriticalSection(&csOpenDllList);
+ LIST_FOR_EACH_ENTRY_SAFE(entry, cursor2, &openDllList, OpenDll, entry)
+ {
+ list_remove(&entry->entry);
+
+ HeapFree(GetProcessHeap(), 0, entry->library_name);
+ HeapFree(GetProcessHeap(), 0, entry);
+ }
+ LeaveCriticalSection(&csOpenDllList);
+}
+
/******************************************************************************
* CoBuildVersion [OLE32.@]
* CoBuildVersion [COMPOBJ.1]
@@ -3721,6 +3736,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
OLEDD_UnInitialize();
COMPOBJ_UninitProcess();
RPC_UnregisterAllChannelHooks();
+ COMPOBJ_DllList_Free();
OLE32_hInstance = 0;
break;
More information about the wine-cvs
mailing list