Paul Vriens : version/tests: Free memory after use.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Dec 6 05:48:58 CST 2006
Module: wine
Branch: master
Commit: d01e76de05877ef2fb67f35c86d73344b6071323
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d01e76de05877ef2fb67f35c86d73344b6071323
Author: Paul Vriens <paul.vriens.wine at gmail.com>
Date: Mon Dec 4 22:21:24 2006 +0100
version/tests: Free memory after use.
---
dlls/version/tests/info.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/version/tests/info.c b/dlls/version/tests/info.c
index b7ac14d..c71ecc6 100644
--- a/dlls/version/tests/info.c
+++ b/dlls/version/tests/info.c
@@ -214,12 +214,12 @@ static void test_info(void)
boolret = GetFileVersionInfoA( "kernel32.dll", 0, retval, pVersionInfo );
ok (boolret, "GetFileVersionInfoA failed: GetLastError = 0x%08x\n", GetLastError());
if (!boolret)
- return;
+ goto cleanup;
boolret = VerQueryValueA( pVersionInfo, backslash, (LPVOID *)&pFixedVersionInfo, &uiLength );
ok (boolret, "VerQueryValueA failed: GetLastError = 0x%08x\n", GetLastError());
if (!boolret)
- return;
+ goto cleanup;
dwlVersion = (((DWORDLONG)pFixedVersionInfo->dwFileVersionMS) << 32) +
pFixedVersionInfo->dwFileVersionLS;
@@ -234,6 +234,9 @@ static void test_info(void)
boolret = VerQueryValueA( pVersionInfo, "\\", (LPVOID *)&pFixedVersionInfo, 0);
ok (boolret, "VerQueryValue failed: GetLastError = 0x%08lx\n", GetLastError());
#endif
+
+cleanup:
+ HeapFree( GetProcessHeap(), 0, pVersionInfo);
}
static void test_32bit_win(void)
More information about the wine-cvs
mailing list