Misha Koshelev mk144210@bcm.edu writes:
/* As on native when the equivalent of WININET_Release is called, the handle
* is already invalid, but if a new handle is created at this time it does
* not yet get assigned the freed handle number */
if( info ) WININET_Release( info );
EnterCriticalSection( &WININET_cs );
if( WININET_dwNextHandle > handle )
WININET_dwNextHandle = handle;
LeaveCriticalSection( &WININET_cs );
This is wrong, the handle could have been reused by then, you can't assume it is still free.