Module: wine Branch: master Commit: d01e76de05877ef2fb67f35c86d73344b6071323 URL: http://source.winehq.org/git/wine.git/?a=commit;h=d01e76de05877ef2fb67f35c86...
Author: Paul Vriens paul.vriens.wine@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)