Removed the deallocation of the irp on error after
IoBuildSynchronousFsdRequest in NtRead/WriteFile.
There is no irp at this point. If the exception handler is hit, the irp
isn't set.
Modified: trunk/reactos/ntoskrnl/io/file.c
_____
Modified: trunk/reactos/ntoskrnl/io/file.c
--- trunk/reactos/ntoskrnl/io/file.c 2005-05-09 20:14:10 UTC (rev
15191)
+++ trunk/reactos/ntoskrnl/io/file.c 2005-05-09 21:28:01 UTC (rev
15192)
@@ -2540,6 +2540,10 @@
ByteOffset,
EventObject,
IoStatusBlock);
+ if (Irp == NULL)
+ {
+ Status = STATUS_INSUFFICIENT_RESOURCES;
+ }
}
_SEH_HANDLE
{
@@ -2548,15 +2552,11 @@
_SEH_END;
/* Cleanup if IRP Allocation Failed */
- if (!NT_SUCCESS(Status) || !Irp)
+ if (!NT_SUCCESS(Status))
{
if (Event) ObDereferenceObject(EventObject);
ObDereferenceObject(FileObject);
- if (Irp)
- {
- IoFreeIrp(Irp);
- }
- return NT_SUCCESS(Status) ? STATUS_INSUFFICIENT_RESOURCES :
Status;
+ return Status;
}
/* Set up IRP Data */
@@ -3117,6 +3117,10 @@
ByteOffset,
EventObject,
IoStatusBlock);
+ if (Irp == NULL)
+ {
+ Status = STATUS_INSUFFICIENT_RESOURCES;
+ }
}
_SEH_HANDLE
{
@@ -3125,15 +3129,14 @@
_SEH_END;
/* Cleanup on failure */
- if (!NT_SUCCESS(Status) || !Irp)
+ if (!NT_SUCCESS(Status))
{
if (Event)
{
ObDereferenceObject(&EventObject);
}
ObDereferenceObject(FileObject);
- if (Irp) IoFreeIrp(Irp);
- return NT_SUCCESS(Status) ? STATUS_INSUFFICIENT_RESOURCES :
Status;
+ return Status;
}
/* Set up IRP Data */
Show replies by date