From 1c3484cdd100f3af2043f7285eee8af7c10af8a6 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Tue, 19 Aug 2008 04:36:05 +0000 Subject: [PATCH] - Make sure we don't complete with STATUS_SUCCESS if MmMapLockedPages fails - Move and enable MmUnlockPages and IoFreeMdl svn path=/branches/aicom-network-fixes/; revision=35446 --- drivers/network/afd/afd/info.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/network/afd/afd/info.c b/drivers/network/afd/afd/info.c index 5f44a088a58..231ce6a8d18 100644 --- a/drivers/network/afd/afd/info.c +++ b/drivers/network/afd/afd/info.c @@ -150,14 +150,15 @@ AfdGetSockOrPeerName( PDEVICE_OBJECT DeviceObject, PIRP Irp, RtlCopyMemory( TransAddr, ConnInfo->RemoteAddress, TaLengthOfTransportAddress ( ConnInfo->RemoteAddress ) ); + else Status = STATUS_INSUFFICIENT_RESOURCES; if( ConnInfo ) ExFreePool( ConnInfo ); if( SysMdl ) IoFreeMdl( SysMdl ); if( TransAddr ) MmUnmapLockedPages( TransAddr, Mdl ); + MmUnlockPages( Mdl ); + IoFreeMdl( Mdl ); } - /* MmUnlockPages( Mdl ); */ } - /* IoFreeMdl( Mdl ); */ } else { Status = STATUS_INSUFFICIENT_RESOURCES; }