From d71894a0ad1332f875a5a9ebdd158a2ace778acc Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Sun, 24 May 2015 12:20:51 +0000 Subject: [PATCH] [NTFS] - Only free the IRP context in case the request is not to be queued - Stubplement request queueing support in NtfsDispatch() svn path=/trunk/; revision=67877 --- reactos/drivers/filesystems/ntfs/dispatch.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/reactos/drivers/filesystems/ntfs/dispatch.c b/reactos/drivers/filesystems/ntfs/dispatch.c index 4a28fb08373..acc7f515a90 100644 --- a/reactos/drivers/filesystems/ntfs/dispatch.c +++ b/reactos/drivers/filesystems/ntfs/dispatch.c @@ -87,8 +87,17 @@ NtfsDispatch(PNTFS_IRP_CONTEXT IrpContext) IoCompleteRequest(Irp, IrpContext->PriorityBoost); } - if (IrpContext) + if (IrpContext->Flags & IRPCONTEXT_QUEUE) + { + /* Reset our status flags before queueing the IRP */ + IrpContext->Flags |= IRPCONTEXT_COMPLETE; + IrpContext->Flags &= ~IRPCONTEXT_QUEUE; + UNIMPLEMENTED_DBGBREAK(); + } + else + { ExFreePoolWithTag(IrpContext, 'PRIN'); + } IoSetTopLevelIrp(NULL); FsRtlExitFileSystem();