Andrew Talbot : winedump: Fix memory leak.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Jan 4 04:45:03 CST 2007


Module: wine
Branch: master
Commit: d39e1c360a31e64512d594dd6aad4d3d89993881
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d39e1c360a31e64512d594dd6aad4d3d89993881

Author: Andrew Talbot <Andrew.Talbot at talbotville.com>
Date:   Wed Jan  3 13:22:49 2007 +0000

winedump: Fix memory leak.

---

 tools/winedump/pe.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/tools/winedump/pe.c b/tools/winedump/pe.c
index d6a0503..cbebba9 100644
--- a/tools/winedump/pe.c
+++ b/tools/winedump/pe.c
@@ -532,7 +532,12 @@ static	void	dump_dir_exported_functions(
         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))))




More information about the wine-cvs mailing list