[PATCH 3/3] programs/winedbg: properly initialize variable on error code path
Eric Pouech
eric.pouech at gmail.com
Wed Mar 2 09:53:01 CST 2022
this was leading to calling HeapFree on the (uninitialized) variable
Signed-off-by: Eric Pouech <eric.pouech at gmail.com>
---
programs/winedbg/types.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/programs/winedbg/types.c b/programs/winedbg/types.c
index 50d1f1b8353..59a5117130c 100644
--- a/programs/winedbg/types.c
+++ b/programs/winedbg/types.c
@@ -590,7 +590,8 @@ BOOL types_print_type(const struct dbg_type* type, BOOL details)
return FALSE;
}
- name = (types_get_info(type, TI_GET_SYMNAME, &ptr) && ptr) ? ptr : L"--none--";
+ if (!types_get_info(type, TI_GET_SYMNAME, &ptr)) ptr = NULL;
+ name = ptr ? ptr : L"--none--";
switch (tag)
{
More information about the wine-devel
mailing list