gecko-dev/intl/icu-patches/bug-1325858-close-key.diff

27 lines
802 B
Diff

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