- Add missing pool allocation failure branch in NtSetInformationFile, and a missing PAGED_CODE check. Spotted by Dmitry Chapyshev.

svn path=/trunk/; revision=41095
This commit is contained in:
Aleksey Bragin 2009-05-24 09:08:51 +00:00
parent b95b9d2353
commit 26c55135e2

View file

@ -2243,6 +2243,7 @@ NtSetInformationFile(IN HANDLE FileHandle,
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 @@ NtSetInformationFile(IN HANDLE FileHandle,
{
/* Use local event */
Event = ExAllocatePoolWithTag(NonPagedPool, sizeof(KEVENT), TAG_IO);
if (!Event)
{
ObDereferenceObject(FileObject);
return STATUS_INSUFFICIENT_RESOURCES;
}
KeInitializeEvent(Event, SynchronizationEvent, FALSE);
LocalEvent = TRUE;
}