Index: ntoskrnl/se/access.c =================================================================== --- ntoskrnl/se/access.c (revision 72642) +++ ntoskrnl/se/access.c (working copy) @@ -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); } /*