Author: ekohl
Date: Sat Sep 10 13:54:16 2016
New Revision: 72644
URL:
http://svn.reactos.org/svn/reactos?rev=72644&view=rev
Log:
[NTOSKRNL]
Fix lock/unlock order in SeLockSubjectContext/SeUnlockSubjectContext.
Patch by Volodymyr Shcherbyna.
CORE-11966 #resolve #comment Thanks a lot!
Modified:
trunk/reactos/ntoskrnl/se/access.c
Modified: trunk/reactos/ntoskrnl/se/access.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/se/access.c?rev=7…
==============================================================================
--- trunk/reactos/ntoskrnl/se/access.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/se/access.c [iso-8859-1] Sat Sep 10 13:54:16 2016
@@ -338,12 +338,14 @@
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);
}
/*