Author: cgutman
Date: Tue Aug 12 13:34:07 2008
New Revision: 35291
URL:
http://svn.reactos.org/svn/reactos?rev=35291&view=rev
Log:
- Free the MDL on failure
- Use _SEH_YIELD
Modified:
branches/aicom-network-fixes/drivers/network/afd/afd/tdi.c
Modified: branches/aicom-network-fixes/drivers/network/afd/afd/tdi.c
URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
==============================================================================
--- branches/aicom-network-fixes/drivers/network/afd/afd/tdi.c [iso-8859-1] (original)
+++ branches/aicom-network-fixes/drivers/network/afd/afd/tdi.c [iso-8859-1] Tue Aug 12
13:34:07 2008
@@ -864,16 +864,11 @@
MmProbeAndLockPages(Mdl, KernelMode, IoModifyAccess);
} _SEH_HANDLE {
AFD_DbgPrint(MIN_TRACE, ("MmProbeAndLockPages() failed.\n"));
+ IoFreeMdl(Mdl);
IoFreeIrp(*Irp);
*Irp = NULL;
- Status = STATUS_INSUFFICIENT_RESOURCES;
+ _SEH_YIELD(return STATUS_INSUFFICIENT_RESOURCES);
} _SEH_END;
-
- if( !NT_SUCCESS(Status) ) {
- IoFreeIrp(*Irp);
- *Irp = NULL;
- return Status;
- }
AFD_DbgPrint(MID_TRACE,("AFD>>> Got an MDL: %x\n", Mdl));
@@ -952,16 +947,11 @@
AFD_DbgPrint(MIN_TRACE, ("probe and lock done\n"));
} _SEH_HANDLE {
AFD_DbgPrint(MIN_TRACE, ("MmProbeAndLockPages() failed.\n"));
+ IoFreeMdl(Mdl);
IoFreeIrp(*Irp);
*Irp = NULL;
- Status = STATUS_INSUFFICIENT_RESOURCES;
+ _SEH_YIELD(return STATUS_INSUFFICIENT_RESOURCES);
} _SEH_END;
-
- if( !NT_SUCCESS(Status) ) {
- IoFreeIrp(*Irp);
- *Irp = NULL;
- return Status;
- }
AFD_DbgPrint(MID_TRACE,("AFD>>> Got an MDL: %x\n", Mdl));
@@ -1055,6 +1045,7 @@
MmProbeAndLockPages(Mdl, KernelMode, IoModifyAccess);
} _SEH_HANDLE {
AFD_DbgPrint(MIN_TRACE, ("MmProbeAndLockPages() failed.\n"));
+ IoFreeMdl(Mdl);
IoFreeIrp(*Irp);
*Irp = NULL;
_SEH_YIELD(return STATUS_INSUFFICIENT_RESOURCES);
@@ -1153,6 +1144,7 @@
MmProbeAndLockPages(Mdl, KernelMode, IoModifyAccess);
} _SEH_HANDLE {
AFD_DbgPrint(MIN_TRACE, ("MmProbeAndLockPages() failed.\n"));
+ IoFreeMdl(Mdl);
IoFreeIrp(*Irp);
*Irp = NULL;
_SEH_YIELD(return STATUS_INSUFFICIENT_RESOURCES);