[NTOSKRNL]

Fix lock/unlock order in SeLockSubjectContext/SeUnlockSubjectContext.
Patch by  Volodymyr Shcherbyna.
CORE-11966 #resolve #comment Thanks a lot!

svn path=/trunk/; revision=72644
This commit is contained in:
Eric Kohl 2016-09-10 13:54:16 +00:00
parent e44c624a3e
commit 796aa0f7b3

View file

@ -338,12 +338,14 @@ SeUnlockSubjectContext(IN PSECURITY_SUBJECT_CONTEXT SubjectContext)
PrimaryToken = SubjectContext->PrimaryToken;
ClientToken = SubjectContext->ClientToken;
/* Unlock the impersonation one if it's there */
if (ClientToken)
{
SepReleaseTokenLock(ClientToken);
}
/* Always unlock the primary one */
SepReleaseTokenLock(PrimaryToken);
/* Unlock the impersonation one if it's there */
if (!ClientToken) return;
SepReleaseTokenLock(ClientToken);
}
/*