Author: cgutman
Date: Sat Aug 23 20:09:48 2008
New Revision: 35582
URL:
http://svn.reactos.org/svn/reactos?rev=35582&view=rev
Log:
- Fail if MmProbeAndLockPages doesn't succeed
- Fail if IoAllocateMdl returns NULL
- Add some ASSERTs
Modified:
branches/aicom-network-fixes/drivers/network/afd/afd/lock.c
Modified: branches/aicom-network-fixes/drivers/network/afd/afd/lock.c
URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
==============================================================================
--- branches/aicom-network-fixes/drivers/network/afd/afd/lock.c [iso-8859-1] (original)
+++ branches/aicom-network-fixes/drivers/network/afd/afd/lock.c [iso-8859-1] Sat Aug 23
20:09:48 2008
@@ -130,9 +130,13 @@
if( LockFailed ) {
IoFreeMdl( MapBuf[i].Mdl );
MapBuf[i].Mdl = NULL;
- LockFailed = FALSE;
+ ExFreePool( NewBuf );
+ return NULL;
}
- }
+ } else {
+ ExFreePool( NewBuf );
+ return NULL;
+ }
}
}
@@ -312,12 +316,15 @@
}
VOID SocketCalloutEnter( PAFD_FCB FCB ) {
+ ASSERT(!FCB->Critical);
ASSERT(FCB->Locked);
FCB->Critical = TRUE;
SocketStateUnlock( FCB );
}
VOID SocketCalloutLeave( PAFD_FCB FCB ) {
+ ASSERT(FCB->Critical);
+ ASSERT(!FCB->Locked);
FCB->Critical = FALSE;
SocketAcquireStateLock( FCB );
}