Author: hpoussin Date: Sat Sep 6 06:45:36 2008 New Revision: 35981
URL: http://svn.reactos.org/svn/reactos?rev=35981&view=rev Log: Open registry entry with only the required rights Free memory with the right tag See issue #3713 for more details.
Modified: trunk/reactos/subsystems/win32/win32k/objects/dc.c
Modified: trunk/reactos/subsystems/win32/win32k/objects/dc.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/obj... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/dc.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/dc.c [iso-8859-1] Sat Sep 6 06:45:36 2008 @@ -3410,14 +3410,14 @@
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)