From bb4b99166ea97c0927d8a5577cb66b783dd36f22 Mon Sep 17 00:00:00 2001 From: Thomas Faber Date: Fri, 1 May 2015 11:57:51 +0000 Subject: [PATCH] [NTOS:IO] - Don't leak event object reference when out of memory in NtReadFile/NtWriteFile svn path=/trunk/; revision=67490 --- reactos/ntoskrnl/io/iomgr/iofunc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/ntoskrnl/io/iomgr/iofunc.c b/reactos/ntoskrnl/io/iomgr/iofunc.c index 165803a6a50..ba3ad3dfe6f 100644 --- a/reactos/ntoskrnl/io/iomgr/iofunc.c +++ b/reactos/ntoskrnl/io/iomgr/iofunc.c @@ -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;