Ken Thomases : dbghelp: Fix a leak of the Mach-O module structure by adding a module_remove callback.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Jun 25 08:19:40 CDT 2015
Module: wine
Branch: master
Commit: 378d557d77cb32d6855201b5fcbdf4dff460fb09
URL: http://source.winehq.org/git/wine.git/?a=commit;h=378d557d77cb32d6855201b5fcbdf4dff460fb09
Author: Ken Thomases <ken at codeweavers.com>
Date: Wed Jun 24 17:13:55 2015 -0500
dbghelp: Fix a leak of the Mach-O module structure by adding a module_remove callback.
---
dlls/dbghelp/macho_module.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/dlls/dbghelp/macho_module.c b/dlls/dbghelp/macho_module.c
index 31beafa..73beb57 100644
--- a/dlls/dbghelp/macho_module.c
+++ b/dlls/dbghelp/macho_module.c
@@ -943,6 +943,14 @@ BOOL macho_fetch_file_info(const WCHAR* name, DWORD_PTR* base,
}
/******************************************************************
+ * macho_module_remove
+ */
+static void macho_module_remove(struct process* pcs, struct module_format* modfmt)
+{
+ HeapFree(GetProcessHeap(), 0, modfmt);
+}
+
+/******************************************************************
* macho_load_file
*
* Loads the information for Mach-O module stored in 'filename'.
@@ -1036,7 +1044,7 @@ static BOOL macho_load_file(struct process* pcs, const WCHAR* filename,
macho_info->module->format_info[DFI_MACHO] = modfmt;
modfmt->module = macho_info->module;
- modfmt->remove = NULL;
+ modfmt->remove = macho_module_remove;
modfmt->loc_compute = NULL;
modfmt->u.macho_info = macho_module_info;
More information about the wine-cvs
mailing list