kernelbase: Don't open Wow6432nodes from create_key().

These can never exist in a newly created key.
This commit is contained in:
Sven Baars 2023-03-17 17:14:37 +01:00 committed by Alexandre Julliard
parent c3bd7c003e
commit 3609508c2f

View file

@ -303,19 +303,6 @@ static NTSTATUS create_key( HKEY *retkey, HKEY root, UNICODE_STRING name, ULONG
while (i < len && buffer[i] == '\\') i++;
buffer += i;
len -= i;
if (force_wow32)
{
name.Buffer = buffer;
name.Length = len * sizeof(WCHAR);
if (is_wow6432node( &name )) force_wow32 = FALSE;
else if ((subkey = open_wow6432node( attr.RootDirectory )))
{
NtClose( attr.RootDirectory );
attr.RootDirectory = subkey;
force_wow32 = FALSE;
}
}
}
}
if (status == STATUS_PREDEFINED_HANDLE)