mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 12:23:31 +00:00
[NTOS:EX]
- Add missing OBJ_KERNEL_HANDLE and avoid handle leak in ExpGetCurrentUserUILanguage CORE-10207 svn path=/trunk/; revision=69553
This commit is contained in:
@@ -55,7 +55,7 @@ ExpGetCurrentUserUILanguage(IN PWSTR MuiName,
|
||||
/* 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 @@ ExpGetCurrentUserUILanguage(IN PWSTR MuiName,
|
||||
/* Fail */
|
||||
Status = STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
|
||||
/* Close the key */
|
||||
ZwClose(KeyHandle);
|
||||
}
|
||||
|
||||
/* Close the key */
|
||||
ZwClose(KeyHandle);
|
||||
}
|
||||
|
||||
/* Close the user key and return */
|
||||
|
||||
Reference in New Issue
Block a user