- Move check for NULL FCB before trying to access it

- Should fix a random crash I got when testing my web server

svn path=/branches/aicom-network-fixes/; revision=35260
This commit is contained in:
Cameron Gutman 2008-08-10 11:23:05 +00:00
parent 55ca1bda96
commit d6823d52cf

View file

@ -392,6 +392,11 @@ VOID PollReeval( PAFD_DEVICE_EXTENSION DeviceExt, PFILE_OBJECT FileObject ) {
/* Take care of any event select signalling */ /* Take care of any event select signalling */
FCB = (PAFD_FCB)FileObject->FsContext; 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 */ /* Not sure if i can do this at DISPATCH_LEVEL ... try it at passive */
AFD_DbgPrint(MID_TRACE,("Current State: %x, Events Fired: %x, " AFD_DbgPrint(MID_TRACE,("Current State: %x, Events Fired: %x, "
"Select Triggers %x\n", "Select Triggers %x\n",
@ -402,11 +407,6 @@ VOID PollReeval( PAFD_DEVICE_EXTENSION DeviceExt, PFILE_OBJECT FileObject ) {
EventSelect = FCB->EventSelect; EventSelect = FCB->EventSelect;
} }
if( !FCB ) {
KeReleaseSpinLock( &DeviceExt->Lock, OldIrql );
return;
}
/* Now signal normal select irps */ /* Now signal normal select irps */
ThePollEnt = DeviceExt->Polls.Flink; ThePollEnt = DeviceExt->Polls.Flink;