From 65169e1f54e8cee5bfbb6632fabd7457c740933e Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Mon, 7 Jun 2010 23:00:04 +0000 Subject: [PATCH] [WDMAUD_KERNEL] - Extend the mdl hack svn path=/trunk/; revision=47687 --- reactos/drivers/wdm/audio/legacy/wdmaud/control.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/reactos/drivers/wdm/audio/legacy/wdmaud/control.c b/reactos/drivers/wdm/audio/legacy/wdmaud/control.c index 07e9ef846d2..4fc1d673c1c 100644 --- a/reactos/drivers/wdm/audio/legacy/wdmaud/control.c +++ b/reactos/drivers/wdm/audio/legacy/wdmaud/control.c @@ -457,15 +457,16 @@ WdmAudReadWrite( Status = KsProbeStreamIrp(Irp, KSPROBE_STREAMREAD | KSPROBE_ALLOCATEMDL | KSPROBE_PROBEANDLOCK, Length); } - /* now free the mdl */ - IoFreeMdl(Mdl); - if (!NT_SUCCESS(Status)) { DPRINT1("KsProbeStreamIrp failed with Status %x Cancel %u\n", Status, Irp->Cancel); + Irp->MdlAddress = Mdl; return SetIrpIoStatus(Irp, Status, 0); } + /* now free the mdl */ + IoFreeMdl(Mdl); + /* get device info */ DeviceInfo = (PWDMAUD_DEVICE_INFO)Irp->AssociatedIrp.SystemBuffer; ASSERT(DeviceInfo);