wininet: Call WSACleanup only if WSAStartup was previously called successfully.

Spotted by Piotr.
This commit is contained in:
Jacek Caban 2015-02-24 13:18:57 +01:00 committed by Alexandre Julliard
parent 5d578b48fc
commit 6d4abc78d0
1 changed files with 2 additions and 1 deletions

View File

@ -406,7 +406,8 @@ void NETCON_unload(void)
if(have_compat_cred_handle)
FreeCredentialsHandle(&compat_cred_handle);
DeleteCriticalSection(&init_sechandle_cs);
WSACleanup();
if(winsock_loaded)
WSACleanup();
}
/* translate a unix error code into a winsock one */