From: teor Date: Thu, 8 Aug 2019 23:51:40 +0000 (+1000) Subject: Merge branch 'bug31343_31374_035' into bug31343_31374_040 X-Git-Tag: tor-0.4.1.5~9^2~1^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7502881deb0ba702d2a6a2ea3d4d24cd998e8616;p=thirdparty%2Ftor.git Merge branch 'bug31343_31374_035' into bug31343_31374_040 --- 7502881deb0ba702d2a6a2ea3d4d24cd998e8616 diff --cc src/lib/time/compat_time.c index c6625c7806,98854bad2c..a047d6c2cd --- a/src/lib/time/compat_time.c +++ b/src/lib/time/compat_time.c @@@ -519,12 -519,10 +519,12 @@@ monotime_init_internal(void HANDLE h = load_windows_system_library(TEXT("kernel32.dll")); if (h) { - GetTickCount64_fn = (GetTickCount64_fn_t) + GetTickCount64_fn = (GetTickCount64_fn_t) (void(*)(void)) GetProcAddress(h, "GetTickCount64"); } - // FreeLibrary(h) ? + // We can't call FreeLibrary(h) here, because freeing the handle may + // unload the library, and cause future calls to GetTickCount64_fn() + // to fail. See 29642 for details. } void