[PATCH 18/19] programs/winedbg: only call HeapFree on rightfully obtained buffers
Eric Pouech
eric.pouech at gmail.com
Wed Dec 8 07:45:26 CST 2021
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 87380487ea2..a5e77c1d5bc 100644
--- a/programs/winedbg/types.c
+++ b/programs/winedbg/types.c
@@ -604,7 +604,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