diff --git a/reactos/lib/ntdll/rtl/handle.c b/reactos/lib/ntdll/rtl/handle.c index 9739ce0d1f6..3c6ba273e04 100644 --- a/reactos/lib/ntdll/rtl/handle.c +++ b/reactos/lib/ntdll/rtl/handle.c @@ -126,9 +126,11 @@ BOOLEAN STDCALL 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);