winedump: Fix memory leak.

This commit is contained in:
Andrew Talbot 2007-01-03 13:22:49 +00:00 committed by Alexandre Julliard
parent e39a3be860
commit d39e1c360a
1 changed files with 6 additions and 1 deletions

View File

@ -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))))