- Don't crash on double InternetCloseHandle.
- Test case for this.
This commit is contained in:
parent
64d69b60c9
commit
12df80a748
|
@ -192,7 +192,8 @@ LPWININETHANDLEHEADER WININET_GetObject( HINTERNET hinternet )
|
|||
|
||||
EnterCriticalSection( &WININET_cs );
|
||||
|
||||
if( (handle > 0) && ( handle <= WININET_dwMaxHandles ) )
|
||||
if( (handle > 0) && ( handle <= WININET_dwMaxHandles ) &&
|
||||
WININET_Handles[handle-1] )
|
||||
info = WININET_AddRef( WININET_Handles[handle-1] );
|
||||
|
||||
LeaveCriticalSection( &WININET_cs );
|
||||
|
|
|
@ -195,6 +195,8 @@ abort:
|
|||
if (hor != 0x0) {
|
||||
rc = InternetCloseHandle(hor);
|
||||
ok ((rc != 0), "InternetCloseHandle of handle opened by HttpOpenRequestA failed\n");
|
||||
rc = InternetCloseHandle(hor);
|
||||
ok ((rc == 0), "Double close of handle opened by HttpOpenRequestA succeeded\n");
|
||||
}
|
||||
if (hic != 0x0) {
|
||||
rc = InternetCloseHandle(hic);
|
||||
|
|
Loading…
Reference in New Issue