]> granicus.if.org Git - php/commitdiff
The call to FreeLibrary() should be within the if, so we don't pass INVALID_HANDLE_VA...
authorKalle Sommer Nielsen <kalle@php.net>
Thu, 11 Aug 2016 02:13:34 +0000 (04:13 +0200)
committerKalle Sommer Nielsen <kalle@php.net>
Thu, 11 Aug 2016 02:13:34 +0000 (04:13 +0200)
win32/time.c

index 9063ebf62900e7332a54eb5a6180fd386afee691..dcc0943ec4062c649c6d8106e45a7081a653f615 100644 (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 */