[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:
Thomas Faber 2011-09-10 10:41:57 +00:00
parent 50058d32a2
commit b37b73edf4

View file

@ -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))
{ {