mirror of
https://github.com/reactos/reactos.git
synced 2025-04-29 10:39:07 +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:
parent
164c7773ba
commit
875281ff63
1 changed files with 4 additions and 4 deletions
|
@ -55,7 +55,7 @@ ExpGetCurrentUserUILanguage(IN PWSTR MuiName,
|
||||||
/* Initialize the attributes and open the key */
|
/* Initialize the attributes and open the key */
|
||||||
InitializeObjectAttributes(&ObjectAttributes,
|
InitializeObjectAttributes(&ObjectAttributes,
|
||||||
&KeyName,
|
&KeyName,
|
||||||
OBJ_CASE_INSENSITIVE,
|
OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE,
|
||||||
UserKey,
|
UserKey,
|
||||||
NULL);
|
NULL);
|
||||||
Status = ZwOpenKey(&KeyHandle, KEY_QUERY_VALUE,&ObjectAttributes);
|
Status = ZwOpenKey(&KeyHandle, KEY_QUERY_VALUE,&ObjectAttributes);
|
||||||
|
@ -88,11 +88,11 @@ ExpGetCurrentUserUILanguage(IN PWSTR MuiName,
|
||||||
/* Fail */
|
/* Fail */
|
||||||
Status = STATUS_UNSUCCESSFUL;
|
Status = STATUS_UNSUCCESSFUL;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Close the key */
|
/* Close the key */
|
||||||
ZwClose(KeyHandle);
|
ZwClose(KeyHandle);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* Close the user key and return */
|
/* Close the user key and return */
|
||||||
ZwClose(UserKey);
|
ZwClose(UserKey);
|
||||||
|
|
Loading…
Reference in a new issue