Author: cgutman
Date: Sun Aug 10 06:23:05 2008
New Revision: 35260
URL:
http://svn.reactos.org/svn/reactos?rev=35260&view=rev
Log:
- Move check for NULL FCB before trying to access it
- Should fix a random crash I got when testing my web server
Modified:
branches/aicom-network-fixes/drivers/network/afd/afd/select.c
Modified: branches/aicom-network-fixes/drivers/network/afd/afd/select.c
URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
==============================================================================
--- branches/aicom-network-fixes/drivers/network/afd/afd/select.c [iso-8859-1] (original)
+++ branches/aicom-network-fixes/drivers/network/afd/afd/select.c [iso-8859-1] Sun Aug 10
06:23:05 2008
@@ -392,6 +392,11 @@
/* Take care of any event select signalling */
FCB = (PAFD_FCB)FileObject->FsContext;
+ if( !FCB ) {
+ KeReleaseSpinLock( &DeviceExt->Lock, OldIrql );
+ return;
+ }
+
/* Not sure if i can do this at DISPATCH_LEVEL ... try it at passive */
AFD_DbgPrint(MID_TRACE,("Current State: %x, Events Fired: %x, "
"Select Triggers %x\n",
@@ -402,11 +407,6 @@
EventSelect = FCB->EventSelect;
}
- if( !FCB ) {
- KeReleaseSpinLock( &DeviceExt->Lock, OldIrql );
- return;
- }
-
/* Now signal normal select irps */
ThePollEnt = DeviceExt->Polls.Flink;