diff --git a/reactos/subsystems/win32/win32k/ntuser/winsta.c b/reactos/subsystems/win32/win32k/ntuser/winsta.c index b22a9d7e2ea..2f44707b070 100644 --- a/reactos/subsystems/win32/win32k/ntuser/winsta.c +++ b/reactos/subsystems/win32/win32k/ntuser/winsta.c @@ -1110,21 +1110,13 @@ BuildWindowStationNameList( OBJECT_ATTRIBUTES ObjectAttributes; NTSTATUS Status; HANDLE DirectoryHandle; - UNICODE_STRING DirectoryName; + UNICODE_STRING DirectoryName = RTL_CONSTANT_STRING(WINSTA_ROOT_NAME); char InitialBuffer[256], *Buffer; ULONG Context, ReturnLength, BufferSize; DWORD EntryCount; POBJECT_DIRECTORY_INFORMATION DirEntry; WCHAR NullWchar; - /* - * Generate name of window station directory - */ - if (!IntGetFullWindowStationName(&DirectoryName, NULL, NULL)) - { - return STATUS_INSUFFICIENT_RESOURCES; - } - /* * Try to open the directory. */ @@ -1140,8 +1132,6 @@ BuildWindowStationNameList( DIRECTORY_QUERY, &ObjectAttributes); - ExFreePool(DirectoryName.Buffer); - if (!NT_SUCCESS(Status)) { return Status;