wininet: Fix a couple of reversed checks that could result in leaked socket handles.

This commit is contained in:
Francois Gouget 2007-03-08 15:30:41 +01:00 committed by Alexandre Julliard
parent 53e76f8370
commit fa41be3fdb
1 changed files with 2 additions and 2 deletions

View File

@ -2007,7 +2007,7 @@ HINTERNET FTP_Connect(LPWININETAPPINFOW hIC, LPCWSTR lpszServerName,
}
lerror:
if (!bSuccess && nsocket == -1)
if (!bSuccess && nsocket != -1)
closesocket(nsocket);
if (!bSuccess && lpwfs)
@ -2378,7 +2378,7 @@ static BOOL FTP_InitListenSocket(LPWININETFTPSESSIONW lpwfs)
bSuccess = TRUE;
lend:
if (!bSuccess && lpwfs->lstnSocket == -1)
if (!bSuccess && lpwfs->lstnSocket != -1)
{
closesocket(lpwfs->lstnSocket);
lpwfs->lstnSocket = -1;