Author: tfaber Date: Fri Oct 16 13:28:40 2015 New Revision: 69553
URL: http://svn.reactos.org/svn/reactos?rev=69553&view=rev Log: [NTOS:EX] - Add missing OBJ_KERNEL_HANDLE and avoid handle leak in ExpGetCurrentUserUILanguage CORE-10207
Modified: trunk/reactos/ntoskrnl/ex/locale.c
Modified: trunk/reactos/ntoskrnl/ex/locale.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/locale.c?rev=69... ============================================================================== --- trunk/reactos/ntoskrnl/ex/locale.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/locale.c [iso-8859-1] Fri Oct 16 13:28:40 2015 @@ -55,7 +55,7 @@ /* Initialize the attributes and open the key */ InitializeObjectAttributes(&ObjectAttributes, &KeyName, - OBJ_CASE_INSENSITIVE, + OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE, UserKey, NULL); Status = ZwOpenKey(&KeyHandle, KEY_QUERY_VALUE,&ObjectAttributes); @@ -88,10 +88,10 @@ /* Fail */ Status = STATUS_UNSUCCESSFUL; } - - /* Close the key */ - ZwClose(KeyHandle); - } + } + + /* Close the key */ + ZwClose(KeyHandle); }
/* Close the user key and return */