[PATCH] winedump: free map on error exit

Marcus Meissner marcus at jet.franken.de
Sat Aug 8 03:55:35 CDT 2009


Hi,

[../wine-git/tools/winedump/pe.c:1549]: (error) Memory leak: map

Ciao, Marcus
---
 tools/winedump/pe.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/winedump/pe.c b/tools/winedump/pe.c
index 5ff8a16..f93021b 100644
--- a/tools/winedump/pe.c
+++ b/tools/winedump/pe.c
@@ -1546,7 +1546,7 @@ static	void	do_grab_sym( void )
 	assert(dll_symbols[j].symbol);
     }
     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++)
     {
-- 
1.5.6



More information about the wine-patches mailing list