1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

The call to FreeLibrary() should be within the if, so we don't pass INVALID_HANDLE_VALUE to it, in case LoadLibrary() fails

This commit is contained in:
Kalle Sommer Nielsen
2016-08-11 04:13:34 +02:00
parent 36b050c2c5
commit ff1a3cecae

View File

@@ -38,10 +38,10 @@ static zend_always_inline MyGetSystemTimeAsFileTime get_time_func(void)
if (hMod) {
/* Max possible resolution <1us, win8/server2012 */
timefunc = (MyGetSystemTimeAsFileTime)GetProcAddress(hMod, "GetSystemTimePreciseAsFileTime");
}
/* Lower the refcount */
FreeLibrary(hMod);
/* Lower the refcount */
FreeLibrary(hMod);
}
if(!timefunc) {
/* 100ns blocks since 01-Jan-1641 */