mirror of
https://github.com/reactos/reactos.git
synced 2025-07-29 09:22:04 +00:00
[RTL] In RtlReleasePrivilege, raise exception if restoring old privileges fails
CORE-17637
This commit is contained in:
parent
fb9ebe17bf
commit
46394ab80d
1 changed files with 6 additions and 3 deletions
|
@ -387,9 +387,12 @@ RtlReleasePrivilege(IN PVOID ReturnedState)
|
|||
else
|
||||
{
|
||||
/* Otherwise, restore old state */
|
||||
ZwAdjustPrivilegesToken(State->Token, FALSE,
|
||||
State->OldPrivileges, 0, NULL, NULL);
|
||||
|
||||
Status = ZwAdjustPrivilegesToken(State->Token, FALSE,
|
||||
State->OldPrivileges, 0, NULL, NULL);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
RtlRaiseStatus(Status);
|
||||
}
|
||||
}
|
||||
|
||||
/* If we used a different buffer for old privileges, just free it */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue