- 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
This commit is contained in:
Cameron Gutman 2008-08-19 04:36:05 +00:00
parent 34a1b59e0a
commit 1c3484cdd1

View file

@ -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;
}