Commit fa41be3f authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

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

parent 53e76f83
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment