]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
doc: Fix an incorrect comment about calling FreeLibrary() on Windows
authorteor <teor@torproject.org>
Mon, 4 Mar 2019 01:22:02 +0000 (11:22 +1000)
committerteor <teor@torproject.org>
Mon, 4 Mar 2019 01:29:15 +0000 (11:29 +1000)
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

index 33e077a587480700fafca63b9926be4dbb35ca1b..c6625c78061f3923f017b1e2912045a09cef9e04 100644 (file)
@@ -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