[NTOS:IO]

- Avoid IRP allocation failure in IopDeleteFile and IopCloseFile. Based on a patch by Volodymyr Shcherbyna.
CORE-11959

svn path=/trunk/; revision=72682
This commit is contained in:
Thomas Faber 2016-09-15 13:25:20 +00:00
parent f2599dd576
commit a2d24bde65

View file

@ -1283,8 +1283,7 @@ IopDeleteFile(IN PVOID ObjectBody)
KeInitializeEvent(&Event, SynchronizationEvent, FALSE);
/* Allocate an IRP */
Irp = IoAllocateIrp(DeviceObject->StackSize, FALSE);
if (!Irp) return;
Irp = IopAllocateIrpMustSucceed(DeviceObject->StackSize);
/* Set it up */
Irp->UserEvent = &Event;
@ -1977,8 +1976,7 @@ IopCloseFile(IN PEPROCESS Process OPTIONAL,
KeInitializeEvent(&Event, SynchronizationEvent, FALSE);
/* Allocate an IRP */
Irp = IoAllocateIrp(DeviceObject->StackSize, FALSE);
if (!Irp) return;
Irp = IopAllocateIrpMustSucceed(DeviceObject->StackSize);
/* Set it up */
Irp->UserEvent = &Event;