From d39e1c360a31e64512d594dd6aad4d3d89993881 Mon Sep 17 00:00:00 2001 From: Andrew Talbot Date: Wed, 3 Jan 2007 13:22:49 +0000 Subject: [PATCH] winedump: Fix memory leak. --- tools/winedump/pe.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/winedump/pe.c b/tools/winedump/pe.c index d6a0503e93..cbebba94b7 100644 --- a/tools/winedump/pe.c +++ b/tools/winedump/pe.c @@ -532,7 +532,12 @@ static void dump_dir_exported_functions(void) printf("\n"); } pFunc = RVA(exportDir->AddressOfFunctions, exportDir->NumberOfFunctions * sizeof(DWORD)); - if (!pFunc) {printf("Can't grab functions' address table\n"); return;} + if (!pFunc) + { + printf("Can't grab functions' address table\n"); + free(map); + return; + } for (i = 0; i < exportDir->NumberOfFunctions; i++) { if (pFunc[i] && !(map[i / 32] & (1 << (i % 32))))