mirror of
https://github.com/reactos/reactos.git
synced 2024-10-05 17:06:29 +00:00
Open registry entry with only the required rights
Free memory with the right tag See issue #3713 for more details. svn path=/trunk/; revision=35981
This commit is contained in:
parent
0f44a26489
commit
7097556bf3
|
@ -3410,14 +3410,14 @@ IntChangeDisplaySettings(
|
|||
|
||||
InitializeObjectAttributes(&ObjectAttributes, &RegistryKey,
|
||||
OBJ_CASE_INSENSITIVE, NULL, NULL);
|
||||
Status = ZwOpenKey(&DevInstRegKey, GENERIC_READ | GENERIC_WRITE, &ObjectAttributes);
|
||||
Status = ZwOpenKey(&DevInstRegKey, KEY_SET_VALUE, &ObjectAttributes);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("Unable to open registry key %wZ (Status 0x%08lx)\n", &RegistryKey, Status);
|
||||
ExFreePoolWithTag(RegistryKey.Buffer, TAG_DC);
|
||||
ExFreePoolWithTag(RegistryKey.Buffer, TAG_RTLREGISTRY);
|
||||
return DISP_CHANGE_FAILED;
|
||||
}
|
||||
ExFreePoolWithTag(RegistryKey.Buffer, TAG_DC);
|
||||
ExFreePoolWithTag(RegistryKey.Buffer, TAG_RTLREGISTRY);
|
||||
|
||||
/* Update needed fields */
|
||||
if (NT_SUCCESS(Status) && DevMode->dmFields & DM_BITSPERPEL)
|
||||
|
|
Loading…
Reference in a new issue