Author: tfaber
Date: Sat Sep 10 10:41:57 2011
New Revision: 53668
URL:
http://svn.reactos.org/svn/reactos?rev=53668&view=rev
Log:
[NTOSKRNL/OB]
- Do not bugcheck in ObpCloseHandle if the handle is -1. Powered by kmtests
Modified:
trunk/reactos/ntoskrnl/ob/obhandle.c
Modified: trunk/reactos/ntoskrnl/ob/obhandle.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/obhandle.c?rev…
==============================================================================
--- trunk/reactos/ntoskrnl/ob/obhandle.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ob/obhandle.c [iso-8859-1] Sat Sep 10 10:41:57 2011
@@ -1711,6 +1711,9 @@
PAGED_CODE();
OBTRACE(OB_HANDLE_DEBUG,
"%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 */
if (ObIsKernelHandle(Handle, AccessMode))