winedbg: Avoid passing a non allocated buffer to HeapFree.

Latest changes to heap management can lead to a crash in this situation.

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
This commit is contained in:
Eric Pouech 2022-12-09 17:37:50 +01:00 committed by Alexandre Julliard
parent df65aee926
commit a922577986

View file

@ -820,7 +820,8 @@ BOOL types_print_type(const struct dbg_type* type, BOOL details, const WCHAR* va
}
if (varname && !printed) dbg_printf(" %ls", varname);
HeapFree(GetProcessHeap(), 0, ptr);
if (name == ptr)
HeapFree(GetProcessHeap(), 0, ptr);
return TRUE;
}