mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
[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:
parent
f2599dd576
commit
a2d24bde65
1 changed files with 2 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue