From c7f0777fc55229d910461a7a38e21f1e17c8913a Mon Sep 17 00:00:00 2001 From: Thomas Faber Date: Thu, 15 Jun 2017 12:56:48 +0200 Subject: [PATCH] advapi32/tests: Properly restore privileges in test_AdjustTokenPrivileges. Signed-off-by: Thomas Faber Signed-off-by: Alexandre Julliard --- dlls/advapi32/tests/security.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c index 0c145a4edde..09c6a721cc2 100644 --- a/dlls/advapi32/tests/security.c +++ b/dlls/advapi32/tests/security.c @@ -6081,7 +6081,7 @@ static void test_default_dacl_owner_sid(void) static void test_AdjustTokenPrivileges(void) { - TOKEN_PRIVILEGES tp, prev; + TOKEN_PRIVILEGES tp; HANDLE token; DWORD len; LUID luid; @@ -6109,7 +6109,8 @@ static void test_AdjustTokenPrivileges(void) tp.PrivilegeCount = 1; tp.Privileges[0].Luid = luid; tp.Privileges[0].Attributes = 0; - AdjustTokenPrivileges(token, FALSE, &tp, sizeof(TOKEN_PRIVILEGES), &prev, NULL); + ret = AdjustTokenPrivileges(token, FALSE, &tp, sizeof(TOKEN_PRIVILEGES), NULL, NULL); + ok(ret, "got %d\n", ret); CloseHandle(token); }