From: Nick Mathewson Date: Thu, 8 Aug 2019 19:24:52 +0000 (-0400) Subject: Merge branch 'ticket31374_035' into maint-0.4.1 X-Git-Tag: tor-0.4.1.5~10^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=53d5b67f07446f5f4100db032cd47281e0cfd7b1;p=thirdparty%2Ftor.git Merge branch 'ticket31374_035' into maint-0.4.1 --- 53d5b67f07446f5f4100db032cd47281e0cfd7b1 diff --cc src/lib/time/compat_time.c index 7136eaba67,98854bad2c..3f41500f3a --- a/src/lib/time/compat_time.c +++ b/src/lib/time/compat_time.c @@@ -527,12 -519,10 +527,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