mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 17:05:46 +00:00
[NTOSKRNL/OB]
- Do not bugcheck in ObpCloseHandle if the handle is -1. Powered by kmtests svn path=/trunk/; revision=53668
This commit is contained in:
parent
50058d32a2
commit
b37b73edf4
1 changed files with 3 additions and 0 deletions
|
@ -1712,6 +1712,9 @@ ObpCloseHandle(IN HANDLE Handle,
|
||||||
OBTRACE(OB_HANDLE_DEBUG,
|
OBTRACE(OB_HANDLE_DEBUG,
|
||||||
"%s - Closing handle: %lx\n", __FUNCTION__, Handle);
|
"%s - Closing handle: %lx\n", __FUNCTION__, Handle);
|
||||||
|
|
||||||
|
if (AccessMode == KernelMode && Handle == (HANDLE)-1)
|
||||||
|
return STATUS_INVALID_HANDLE;
|
||||||
|
|
||||||
/* Check if we're dealing with a kernel handle */
|
/* Check if we're dealing with a kernel handle */
|
||||||
if (ObIsKernelHandle(Handle, AccessMode))
|
if (ObIsKernelHandle(Handle, AccessMode))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue