[KERNEL32]
authorThomas Faber <thomas.faber@reactos.org>
Sat, 25 Feb 2017 13:06:25 +0000 (13:06 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Sat, 25 Feb 2017 13:06:25 +0000 (13:06 +0000)
- Avoid leaving lpRootPath initialized in GetDriveTypeW. Powered by /RTC1

svn path=/trunk/; revision=73905

reactos/dll/win32/kernel32/client/file/disk.c

index 4f29f47..2c5e4f7 100644 (file)
@@ -411,6 +411,7 @@ GetDriveTypeW(IN LPCWSTR lpRootPathName)
 
         TRACE("lpRootPathName: %S\n", lpRootPathName);
 
+        lpRootPath = lpRootPathName;
         if (Length == 2)
         {
             WCHAR DriveLetter = RtlUpcaseUnicodeChar(lpRootPathName[0]);
@@ -428,10 +429,6 @@ GetDriveTypeW(IN LPCWSTR lpRootPathName)
                 lpRootPath = CurrentDir;
             }
         }
-        else
-        {
-            lpRootPath = lpRootPathName;
-        }
     }
 
     TRACE("lpRootPath: %S\n", lpRootPath);