mirror of
https://github.com/reactos/wine.git
synced 2024-12-03 09:20:56 +00:00
dbghelp: Fix a leak of the Mach-O module structure by adding a module_remove callback.
This commit is contained in:
parent
8430ebc6b5
commit
378d557d77
@ -942,6 +942,14 @@ BOOL macho_fetch_file_info(const WCHAR* name, DWORD_PTR* base,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
* macho_module_remove
|
||||
*/
|
||||
static void macho_module_remove(struct process* pcs, struct module_format* modfmt)
|
||||
{
|
||||
HeapFree(GetProcessHeap(), 0, modfmt);
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
* macho_load_file
|
||||
*
|
||||
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user