зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1325858 - Redundant handles open for HKLM\SYSTEM\ControlSet001\Control\TimeZoneInformation r=andrebargull
This commit is contained in:
Родитель
f5651bd75d
Коммит
a88f01d23a
|
@ -0,0 +1,26 @@
|
|||
getTZKeyName in common/wintz.cpp leaks registry handle.
|
||||
|
||||
https://ssl.icu-project.org/trac/ticket/12908
|
||||
|
||||
diff --git a/intl/icu/source/common/wintz.c b/intl/icu/source/common/wintz.c
|
||||
--- a/intl/icu/source/common/wintz.c
|
||||
+++ b/intl/icu/source/common/wintz.c
|
||||
@@ -211,16 +211,18 @@ static LONG getTZKeyName(char* tzKeyName
|
||||
hkey,
|
||||
"TimeZoneKeyName",
|
||||
NULL,
|
||||
NULL,
|
||||
(LPBYTE)tzKeyName,
|
||||
&cbData);
|
||||
}
|
||||
|
||||
+ RegCloseKey(hkey);
|
||||
+
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
This code attempts to detect the Windows time zone, as set in the
|
||||
Windows Date and Time control panel. It attempts to work on
|
||||
multiple flavors of Windows (9x, Me, NT, 2000, XP) and on localized
|
||||
installs. It works by directly interrogating the registry and
|
|
@ -216,6 +216,8 @@ static LONG getTZKeyName(char* tzKeyName, int32_t length) {
|
|||
&cbData);
|
||||
}
|
||||
|
||||
RegCloseKey(hkey);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -61,6 +61,7 @@ for patch in \
|
|||
bug-1172609-timezone-recreateDefault.diff \
|
||||
bug-1198952-workaround-make-3.82-bug.diff \
|
||||
bug-1228227-bug-1263325-libc++-gcc_hidden.diff \
|
||||
bug-1325858-close-key.diff \
|
||||
ucol_getKeywordValuesForLocale-ulist_resetList.diff \
|
||||
unum_formatDoubleForFields.diff \
|
||||
; do
|
||||
|
|
Загрузка…
Ссылка в новой задаче