[version/tests] Free memory after use
Paul Vriens
paul.vriens.wine at gmail.com
Mon Dec 4 15:21:24 CST 2006
Hi,
and another one.
Changelog
Free memory after use
Cheers,
Paul.
---
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)
--
1.4.4.1
More information about the wine-patches
mailing list