advapi32/tests: Fix a couple of leaks (Valgrind).

Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Matteo Bruni 2018-01-10 23:44:25 +01:00 committed by Alexandre Julliard
parent fc92960cf4
commit 9ccce0ce64
1 changed files with 3 additions and 0 deletions

View File

@ -6571,6 +6571,8 @@ static void test_system_security_access(void)
/* privilege is checked on access */ /* privilege is checked on access */
err = GetSecurityInfo( hkey, SE_REGISTRY_KEY, SACL_SECURITY_INFORMATION, NULL, NULL, NULL, &sacl, &sd ); err = GetSecurityInfo( hkey, SE_REGISTRY_KEY, SACL_SECURITY_INFORMATION, NULL, NULL, NULL, &sacl, &sd );
todo_wine ok( err == ERROR_PRIVILEGE_NOT_HELD, "got %u\n", err ); todo_wine ok( err == ERROR_PRIVILEGE_NOT_HELD, "got %u\n", err );
if (err == ERROR_SUCCESS)
LocalFree( sd );
priv.PrivilegeCount = 1; priv.PrivilegeCount = 1;
priv.Privileges[0].Luid = luid; priv.Privileges[0].Luid = luid;
@ -7085,6 +7087,7 @@ static void test_token_security_descriptor(void)
CloseHandle(info.hThread); CloseHandle(info.hThread);
LocalFree(acl_child); LocalFree(acl_child);
HeapFree(GetProcessHeap(), 0, sd2);
LocalFree(psid); LocalFree(psid);
CloseHandle(token3); CloseHandle(token3);