mirror of https://github.com/OpenVPN/openvpn-gui
Fix a handle leak: close registry key in localization.c
- Also call Kill the IDT_STOP_TIMER in StatusDialogFunc. Though timers will get destroyed during Window destruction an explicit KillTimer in case still running is the "right" thing to do. Signed-off-by: Selva Nair <selva.nair@gmail.com>pull/608/head
parent
aaeb8d2700
commit
acb5b8f9c8
|
@ -97,7 +97,10 @@ GetGUILanguage(void)
|
|||
|
||||
LONG status = RegOpenKeyEx(HKEY_CURRENT_USER, GUI_REGKEY_HKCU, 0, KEY_READ, ®key);
|
||||
if (status == ERROR_SUCCESS)
|
||||
{
|
||||
GetRegistryValueNumeric(regkey, _T("ui_language"), &value);
|
||||
RegCloseKey(regkey);
|
||||
}
|
||||
|
||||
gui_language = ( value != 0 ? value : GetUserDefaultUILanguage() );
|
||||
InitMUILanguage(gui_language);
|
||||
|
|
Loading…
Reference in New Issue