From: "Erich E. Hoover" Subject: [PATCH 7/7] advapi32: Fix intermittent 64-bit test failure (resend). Message-Id: Date: Mon, 17 Dec 2012 19:01:37 -0700 This patch fixes an intermittent test failure on 64-bit systems in test_GetNamedSecurityInfoA due to the "user" variable being freed too early ("user_sid" is within "user"). From d719364e5b072e1b244a2eb7899b5b747e1fb6bb Mon Sep 17 00:00:00 2001 From: Erich Hoover Date: Mon, 17 Dec 2012 13:36:54 -0700 Subject: advapi32: Fix intermittent 64-bit test failure. --- dlls/advapi32/tests/security.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c index fbbbd17..5f537d1 100644 --- a/dlls/advapi32/tests/security.c +++ b/dlls/advapi32/tests/security.c @@ -3119,7 +3119,6 @@ static void test_GetNamedSecurityInfoA(void) bret = InitializeAcl(pDacl, sizeof(dacl), ACL_REVISION); ok(bret, "Failed to initialize ACL.\n"); bret = pAddAccessAllowedAceEx(pDacl, ACL_REVISION, 0, GENERIC_ALL, user_sid); - HeapFree(GetProcessHeap(), 0, user); ok(bret, "Failed to add Current User to ACL.\n"); bret = pAddAccessAllowedAceEx(pDacl, ACL_REVISION, 0, GENERIC_ALL, admin_sid); ok(bret, "Failed to add Administrator Group to ACL.\n"); @@ -3134,6 +3133,7 @@ static void test_GetNamedSecurityInfoA(void) if (error != ERROR_SUCCESS && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)) { win_skip("SetNamedSecurityInfoA is not implemented\n"); + HeapFree(GetProcessHeap(), 0, user); CloseHandle(hTemp); return; } @@ -3144,6 +3144,7 @@ static void test_GetNamedSecurityInfoA(void) if (error != ERROR_SUCCESS && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)) { win_skip("GetNamedSecurityInfoA is not implemented\n"); + HeapFree(GetProcessHeap(), 0, user); return; } ok(!error, "GetNamedSecurityInfo failed with error %d\n", error); @@ -3174,6 +3175,7 @@ static void test_GetNamedSecurityInfoA(void) "Administators Group ACE has unexpected mask (0x%x != 0x1f01ff)\n", ace->Mask); } LocalFree(pSD); + HeapFree(GetProcessHeap(), 0, user); CloseHandle(hTemp); } -- 1.7.9.5