dbghelp: Fix use after free.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
2f2891e5d5
commit
e19b18dd82
|
@ -1058,7 +1058,6 @@ BOOL WINAPI SymUnloadModule64(HANDLE hProcess, DWORD64 BaseOfDll)
|
||||||
if (!pcs) return FALSE;
|
if (!pcs) return FALSE;
|
||||||
module = module_find_by_addr(pcs, BaseOfDll, DMT_UNKNOWN);
|
module = module_find_by_addr(pcs, BaseOfDll, DMT_UNKNOWN);
|
||||||
if (!module) return FALSE;
|
if (!module) return FALSE;
|
||||||
if (!module_remove(pcs, module)) return FALSE;
|
|
||||||
/* remove local scope if defined inside this module */
|
/* remove local scope if defined inside this module */
|
||||||
if (pcs->localscope_pc >= module->module.BaseOfImage &&
|
if (pcs->localscope_pc >= module->module.BaseOfImage &&
|
||||||
pcs->localscope_pc < module->module.BaseOfImage + module->module.ImageSize)
|
pcs->localscope_pc < module->module.BaseOfImage + module->module.ImageSize)
|
||||||
|
@ -1066,6 +1065,7 @@ BOOL WINAPI SymUnloadModule64(HANDLE hProcess, DWORD64 BaseOfDll)
|
||||||
pcs->localscope_pc = 0;
|
pcs->localscope_pc = 0;
|
||||||
pcs->localscope_symt = NULL;
|
pcs->localscope_symt = NULL;
|
||||||
}
|
}
|
||||||
|
module_remove(pcs, module);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue