mirror of
https://github.com/reactos/reactos.git
synced 2025-04-20 12:29:56 +00:00
unlock the CID in PsLookupProcessByProcessId, PsLookupProcessThreadByCid and PsLookupThreadByThreadId when the lookup succeeded, not failed
svn path=/trunk/; revision=17196
This commit is contained in:
parent
f61e4f1230
commit
e138304bf5
2 changed files with 6 additions and 6 deletions
|
@ -366,7 +366,7 @@ PspCreateProcess(OUT PHANDLE ProcessHandle,
|
|||
DPRINT("Initialzing Process CID Handle\n");
|
||||
CidEntry.u1.Object = Process;
|
||||
CidEntry.u2.GrantedAccess = 0;
|
||||
Process->UniqueProcessId = (ExCreateHandle(PspCidTable, &CidEntry));
|
||||
Process->UniqueProcessId = ExCreateHandle(PspCidTable, &CidEntry);
|
||||
DPRINT("Created CID: %d\n", Process->UniqueProcessId);
|
||||
if(!Process->UniqueProcessId)
|
||||
{
|
||||
|
@ -479,8 +479,8 @@ PsLookupProcessByProcessId(IN HANDLE ProcessId,
|
|||
PAGED_CODE();
|
||||
|
||||
/* Get the CID Handle Entry */
|
||||
if (!(CidEntry = ExMapHandleToPointer(PspCidTable,
|
||||
ProcessId)))
|
||||
if ((CidEntry = ExMapHandleToPointer(PspCidTable,
|
||||
ProcessId)))
|
||||
{
|
||||
/* Get the Process */
|
||||
FoundProcess = CidEntry->u1.Object;
|
||||
|
@ -517,7 +517,7 @@ PsLookupProcessThreadByCid(IN PCLIENT_ID Cid,
|
|||
PAGED_CODE();
|
||||
|
||||
/* Get the CID Handle Entry */
|
||||
if (!(CidEntry = ExMapHandleToPointer(PspCidTable,
|
||||
if ((CidEntry = ExMapHandleToPointer(PspCidTable,
|
||||
Cid->UniqueThread)))
|
||||
{
|
||||
/* Get the Process */
|
||||
|
|
|
@ -376,8 +376,8 @@ PsLookupThreadByThreadId(IN HANDLE ThreadId,
|
|||
PAGED_CODE();
|
||||
|
||||
/* Get the CID Handle Entry */
|
||||
if (!(CidEntry = ExMapHandleToPointer(PspCidTable,
|
||||
ThreadId)))
|
||||
if ((CidEntry = ExMapHandleToPointer(PspCidTable,
|
||||
ThreadId)))
|
||||
{
|
||||
/* Get the Process */
|
||||
FoundThread = CidEntry->u1.Object;
|
||||
|
|
Loading…
Reference in a new issue