Author: arty
Date: Sat Apr 5 18:12:05 2008
New Revision: 32876
URL:
http://svn.reactos.org/svn/reactos?rev=32876&view=rev
Log:
Initialize this resource before the first potential use.
Modified:
trunk/reactos/drivers/filesystems/cdfs/fsctl.c
Modified: trunk/reactos/drivers/filesystems/cdfs/fsctl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/cdfs/f…
==============================================================================
--- trunk/reactos/drivers/filesystems/cdfs/fsctl.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/cdfs/fsctl.c [iso-8859-1] Sat Apr 5 18:12:05 2008
@@ -361,6 +361,11 @@
NewDeviceObject->StackSize = DeviceExt->StorageDevice->StackSize + 1;
NewDeviceObject->Flags &= ~DO_DEVICE_INITIALIZING;
+ /* Close (and cleanup) might be called from IoCreateStreamFileObject
+ * but we use this resource from CdfsCleanup, therefore it should be
+ * initialized no later than this. */
+ ExInitializeResourceLite(&DeviceExt->DirResource);
+
DeviceExt->StreamFileObject = IoCreateStreamFileObject(NULL,
DeviceExt->StorageDevice);
@@ -406,7 +411,6 @@
Fcb);
ExInitializeResourceLite(&DeviceExt->VcbResource);
- ExInitializeResourceLite(&DeviceExt->DirResource);
KeInitializeSpinLock(&DeviceExt->FcbListLock);
InitializeListHead(&DeviceExt->FcbListHead);