mirror of
https://github.com/reactos/reactos.git
synced 2025-04-19 04:07:16 +00:00
NtCreateJobObject() should create the handle instead of just returning a uninitialized variable
svn path=/trunk/; revision=13197
This commit is contained in:
parent
81fd53f09d
commit
bbc9243d77
1 changed files with 20 additions and 11 deletions
|
@ -262,19 +262,28 @@ NtCreateJobObject(PHANDLE JobHandle,
|
|||
InsertTailList(&PsJobListHead, &Job->JobLinks);
|
||||
ExReleaseFastMutex(&PsJobListLock);
|
||||
|
||||
/* pass the handle back to the caller */
|
||||
_SEH_TRY
|
||||
Status = ObInsertObject(Job,
|
||||
NULL,
|
||||
DesiredAccess,
|
||||
0,
|
||||
NULL,
|
||||
&hJob);
|
||||
if(NT_SUCCESS(Status))
|
||||
{
|
||||
/* NOTE: if the caller passed invalid buffers to receive the handle it's his
|
||||
own fault! the object will still be created and live... It's possible
|
||||
to find the handle using ObFindHandleForObject()! */
|
||||
*JobHandle = hJob;
|
||||
/* pass the handle back to the caller */
|
||||
_SEH_TRY
|
||||
{
|
||||
/* NOTE: if the caller passed invalid buffers to receive the handle it's his
|
||||
own fault! the object will still be created and live... It's possible
|
||||
to find the handle using ObFindHandleForObject()! */
|
||||
*JobHandle = hJob;
|
||||
}
|
||||
_SEH_HANDLE
|
||||
{
|
||||
Status = _SEH_GetExceptionCode();
|
||||
}
|
||||
_SEH_END;
|
||||
}
|
||||
_SEH_HANDLE
|
||||
{
|
||||
Status = _SEH_GetExceptionCode();
|
||||
}
|
||||
_SEH_END;
|
||||
}
|
||||
|
||||
return Status;
|
||||
|
|
Loading…
Reference in a new issue