Author: fireball Date: Tue Nov 20 14:53:15 2007 New Revision: 30592
URL: http://svn.reactos.org/svn/reactos?rev=30592&view=rev Log: - Don't create a possibility for CriticalRegion leakage (spotted by PREfast).
Modified: trunk/reactos/drivers/filesystems/vfat/misc.c
Modified: trunk/reactos/drivers/filesystems/vfat/misc.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/vfat/mi... ============================================================================== --- trunk/reactos/drivers/filesystems/vfat/misc.c (original) +++ trunk/reactos/drivers/filesystems/vfat/misc.c Tue Nov 20 14:53:15 2007 @@ -142,6 +142,7 @@ { NTSTATUS Status; PVFAT_IRP_CONTEXT IrpContext; + KIRQL Irql;
DPRINT ("VfatBuildRequest (DeviceObject %x, Irp %x)\n", DeviceObject, Irp);
@@ -156,17 +157,18 @@ } else { - if (KeGetCurrentIrql() <= PASSIVE_LEVEL) + Irql = KeGetCurrentIrql(); + if (Irql <= PASSIVE_LEVEL) { FsRtlEnterFileSystem(); } else { - DPRINT1("Vfat is entered at irql = %d\n", KeGetCurrentIrql()); + DPRINT1("Vfat is entered at irql = %d\n", Irql); } Status = VfatDispatchRequest (IrpContext);
- if (KeGetCurrentIrql() <= PASSIVE_LEVEL) + if (Irql <= PASSIVE_LEVEL) { FsRtlExitFileSystem(); }