mirror of
https://github.com/reactos/reactos.git
synced 2026-07-03 09:44:49 +08:00
[NTOS:IO]
- Don't leak event object reference when out of memory in NtReadFile/NtWriteFile svn path=/trunk/; revision=67490
This commit is contained in:
@@ -2359,7 +2359,7 @@ NtReadFile(IN HANDLE FileHandle,
|
||||
|
||||
/* Allocate the IRP */
|
||||
Irp = IoAllocateIrp(DeviceObject->StackSize, FALSE);
|
||||
if (!Irp) return IopCleanupFailedIrp(FileObject, NULL, NULL);
|
||||
if (!Irp) return IopCleanupFailedIrp(FileObject, EventObject, NULL);
|
||||
|
||||
/* Set the IRP */
|
||||
Irp->Tail.Overlay.OriginalFileObject = FileObject;
|
||||
@@ -3279,7 +3279,7 @@ NtWriteFile(IN HANDLE FileHandle,
|
||||
|
||||
/* Allocate the IRP */
|
||||
Irp = IoAllocateIrp(DeviceObject->StackSize, FALSE);
|
||||
if (!Irp) return IopCleanupFailedIrp(FileObject, NULL, NULL);
|
||||
if (!Irp) return IopCleanupFailedIrp(FileObject, EventObject, NULL);
|
||||
|
||||
/* Set the IRP */
|
||||
Irp->Tail.Overlay.OriginalFileObject = FileObject;
|
||||
|
||||
Reference in New Issue
Block a user