Commit 91bbec01 authored by Jan Zerebecki's avatar Jan Zerebecki Committed by Alexandre Julliard

wininet: Fix fd leak on failure case.

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