wininet: Fix fd leak on failure case.

This commit is contained in:
Jan Zerebecki 2006-09-06 10:46:10 +02:00 committed by Alexandre Julliard
parent 1ee1d819f9
commit 91bbec013b
1 changed files with 1 additions and 0 deletions

View File

@ -2420,6 +2420,7 @@ static BOOL FTP_DoPassive(LPWININETFTPSESSIONW lpwfs)
if (connect(nsocket, (struct sockaddr *)&dataSocketAddress, sizeof(dataSocketAddress)))
{
ERR("can't connect passive FTP data port.\n");
closesocket(nsocket);
goto lend;
}
lpwfs->pasvSocket = nsocket;