Author: arty Date: Fri Nov 20 17:00:35 2009 New Revision: 44238
URL: http://svn.reactos.org/svn/reactos?rev=44238&view=rev Log: Fix checking the wrong pointer for allocation failure, caught by Amine.
Modified: branches/arty-newcc/ntoskrnl/fsrtl/filelock.c
Modified: branches/arty-newcc/ntoskrnl/fsrtl/filelock.c URL: http://svn.reactos.org/svn/reactos/branches/arty-newcc/ntoskrnl/fsrtl/filelo... ============================================================================== --- branches/arty-newcc/ntoskrnl/fsrtl/filelock.c [iso-8859-1] (original) +++ branches/arty-newcc/ntoskrnl/fsrtl/filelock.c [iso-8859-1] Fri Nov 20 17:00:35 2009 @@ -9,7 +9,7 @@ /* INCLUDES ******************************************************************/
#include <ntoskrnl.h> -//#define NDEBUG +#define NDEBUG #include <debug.h>
/* GLOBALS *******************************************************************/ @@ -261,7 +261,7 @@ PLOCK_INFORMATION LockInfo; BOOLEAN InsertedNew;
- DPRINT1("FsRtlPrivateLock(FileLock %x,FileObject %x,FileOffset %x,Length %x,Process %x, Key %x, FailImmediately %x, Exclusive %x)\n", + DPRINT("FsRtlPrivateLock(FileLock %x,FileObject %x,FileOffset %x,Length %x,Process %x, Key %x, FailImmediately %x, Exclusive %x)\n", FileLock, FileObject, FileOffset->LowPart, @@ -277,7 +277,7 @@ { LockInfo = ExAllocatePool(PagedPool, sizeof(LOCK_INFORMATION)); FileLock->LockInformation = LockInfo; - if (!FileLock) + if (!LockInfo) { DPRINT("out of memory\n"); return FALSE;