[tor-commits] [tor/maint-0.4.0] doc: Fix an incorrect comment about calling FreeLibrary() on Windows
nickm at torproject.org
nickm at torproject.org
Mon Mar 11 13:45:55 UTC 2019
commit f186f21a4efb9dafe2c29f850126d509079c0c37
Author: teor <teor at torproject.org>
Date: Mon Mar 4 11:22:02 2019 +1000
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.
---
src/lib/time/compat_time.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/lib/time/compat_time.c b/src/lib/time/compat_time.c
index 33e077a58..c6625c780 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
More information about the tor-commits
mailing list