[ros-diffs] [cgutman] 35446: - Make sure we don't complete with STATUS_SUCCESS if MmMapLockedPages fails - Move and enable MmUnlockPages and IoFreeMdl

cgutman at svn.reactos.org cgutman at svn.reactos.org
Tue Aug 19 06:36:05 CEST 2008


Author: cgutman
Date: Mon Aug 18 23:36:05 2008
New Revision: 35446

URL: http://svn.reactos.org/svn/reactos?rev=35446&view=rev
Log:
 - Make sure we don't complete with STATUS_SUCCESS if MmMapLockedPages fails
 - Move and enable MmUnlockPages and IoFreeMdl

Modified:
    branches/aicom-network-fixes/drivers/network/afd/afd/info.c

Modified: branches/aicom-network-fixes/drivers/network/afd/afd/info.c
URL: http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/network/afd/afd/info.c?rev=35446&r1=35445&r2=35446&view=diff
==============================================================================
--- branches/aicom-network-fixes/drivers/network/afd/afd/info.c [iso-8859-1] (original)
+++ branches/aicom-network-fixes/drivers/network/afd/afd/info.c [iso-8859-1] Mon Aug 18 23:36:05 2008
@@ -150,14 +150,15 @@
                     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;
     }



More information about the Ros-diffs mailing list