Author: fireball
Date: Sun May 24 13:08:51 2009
New Revision: 41095
URL:
http://svn.reactos.org/svn/reactos?rev=41095&view=rev
Log:
- Add missing pool allocation failure branch in NtSetInformationFile, and a missing
PAGED_CODE check. Spotted by Dmitry Chapyshev.
Modified:
trunk/reactos/ntoskrnl/io/iomgr/iofunc.c
Modified: trunk/reactos/ntoskrnl/io/iomgr/iofunc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/iofunc.c…
==============================================================================
--- trunk/reactos/ntoskrnl/io/iomgr/iofunc.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/iomgr/iofunc.c [iso-8859-1] Sun May 24 13:08:51 2009
@@ -2243,6 +2243,7 @@
PVOID Queue;
PFILE_COMPLETION_INFORMATION CompletionInfo = FileInformation;
PIO_COMPLETION_CONTEXT Context;
+ PAGED_CODE();
IOTRACE(IO_API_DEBUG, "FileHandle: %p\n", FileHandle);
/* Check if we're called from user mode */
@@ -2363,6 +2364,12 @@
{
/* Use local event */
Event = ExAllocatePoolWithTag(NonPagedPool, sizeof(KEVENT), TAG_IO);
+ if (!Event)
+ {
+ ObDereferenceObject(FileObject);
+ return STATUS_INSUFFICIENT_RESOURCES;
+ }
+
KeInitializeEvent(Event, SynchronizationEvent, FALSE);
LocalEvent = TRUE;
}