RtlFreeHandle only should call RtlIsValidHandle in debug builds.
Modified: trunk/reactos/lib/ntdll/rtl/handle.c

Modified: trunk/reactos/lib/ntdll/rtl/handle.c
--- trunk/reactos/lib/ntdll/rtl/handle.c	2005-08-07 23:18:40 UTC (rev 17187)
+++ trunk/reactos/lib/ntdll/rtl/handle.c	2005-08-07 23:19:15 UTC (rev 17188)
@@ -126,9 +126,11 @@
 RtlFreeHandle(PRTL_HANDLE_TABLE HandleTable,
 	      PRTL_HANDLE_TABLE_ENTRY Handle)
 {
+#if DBG
    /* check if handle is valid */
    if (RtlIsValidHandle(HandleTable, Handle))
      return FALSE;
+#endif
 
    /* clear handle */
    memset(Handle, 0, HandleTable->SizeOfHandleTableEntry);