[KMTESTS]
authorThomas Faber <thomas.faber@reactos.org>
Mon, 22 Aug 2011 00:46:51 +0000 (00:46 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Mon, 22 Aug 2011 00:46:51 +0000 (00:46 +0000)
- Fix uninitialized variable usage. Found by ROS ;)

svn path=/branches/GSoC_2011/KMTestSuite/; revision=53364

kmtests/kmtest_drv/kmtest_standalone.c

index 29ded93..a8bb707 100644 (file)
@@ -114,11 +114,11 @@ DriverEntry(
     RtlInitUnicodeString(&DeviceName, DeviceNameBuffer);
     DeviceName.MaximumLength = sizeof DeviceNameBuffer;
     TestEntry(DriverObject, RegistryPath, &DeviceNameSuffix, &Flags);
-    RtlAppendUnicodeToString(&DeviceName, DeviceNameSuffix);
 
     /* create test device */
     if (!(Flags & TESTENTRY_NO_CREATE_DEVICE))
     {
+        RtlAppendUnicodeToString(&DeviceName, DeviceNameSuffix);
         Status = IoCreateDevice(DriverObject, 0, &DeviceName,
                                 FILE_DEVICE_UNKNOWN,
                                 FILE_DEVICE_SECURE_OPEN | FILE_READ_ONLY_DEVICE,