aboutsummaryrefslogtreecommitdiff
path: root/src/lib/time/compat_time.c
diff options
context:
space:
mode:
authorteor <teor@torproject.org>2019-03-04 11:22:02 +1000
committerteor <teor@torproject.org>2019-03-04 11:29:15 +1000
commitf186f21a4efb9dafe2c29f850126d509079c0c37 (patch)
tree3fac443b259c73492216a4689fa78c188f9cd1ce /src/lib/time/compat_time.c
parent955a622391192ff9cb65dddcb110532616f890ff (diff)
downloadtor-f186f21a4efb9dafe2c29f850126d509079c0c37.tar.gz
tor-f186f21a4efb9dafe2c29f850126d509079c0c37.zip
doc: Fix an incorrect comment about calling FreeLibrary() on Windows
There's an incorrect comment in compat_time.c that suggests we call FreeLibrary() before we're done using the library's functions. See 29642 for background. Closes ticket 29643.
Diffstat (limited to 'src/lib/time/compat_time.c')
-rw-r--r--src/lib/time/compat_time.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/time/compat_time.c b/src/lib/time/compat_time.c
index 33e077a587..c6625c7806 100644
--- a/src/lib/time/compat_time.c
+++ b/src/lib/time/compat_time.c
@@ -522,7 +522,9 @@ monotime_init_internal(void)
GetTickCount64_fn = (GetTickCount64_fn_t)
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