mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
- 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:
parent
b95b9d2353
commit
26c55135e2
1 changed files with 7 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue