Author: janderwald
Date: Sat Feb 12 18:52:35 2011
New Revision: 50671
URL:
http://svn.reactos.org/svn/reactos?rev=50671&view=rev
Log:
[KS]
- Fix a bug where a spinlock was acquired on not initialized local variable
- Found by msvc
Modified:
branches/cmake-bringup/drivers/ksfilter/ks/swenum.c
Modified: branches/cmake-bringup/drivers/ksfilter/ks/swenum.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/drivers/ksfilter/…
==============================================================================
--- branches/cmake-bringup/drivers/ksfilter/ks/swenum.c [iso-8859-1] (original)
+++ branches/cmake-bringup/drivers/ksfilter/ks/swenum.c [iso-8859-1] Sat Feb 12 18:52:35
2011
@@ -1156,11 +1156,11 @@
BOOLEAN DoInvalidate = FALSE;
KIRQL OldLevel;
+ /* get device extension */
+ BusDeviceExtension = (PBUS_ENUM_DEVICE_EXTENSION)Parameter;
+
/* acquire lock */
KeAcquireSpinLock(&BusDeviceExtension->Lock, &OldLevel);
-
- /* get device extension */
- BusDeviceExtension = (PBUS_ENUM_DEVICE_EXTENSION)Parameter;
/* get current time */
KeQuerySystemTime(&Time);