mirror of
https://github.com/curl/curl.git
synced 2026-07-03 14:07:16 +03:00
fixed a leaked file descriptor when PORT failed
This commit is contained in:
parent
2c100371d2
commit
9ee94b3d84
1 changed files with 6 additions and 0 deletions
|
|
@ -733,6 +733,12 @@ CURLcode _ftp(struct connectdata *conn)
|
|||
|
||||
if ( h ) {
|
||||
if( (portsock = socket(AF_INET, SOCK_STREAM, 0)) >= 0 ) {
|
||||
|
||||
/* we set the secondary socket variable to this for now, it
|
||||
is only so that the cleanup function will close it in case
|
||||
we fail before the true secondary stuff is made */
|
||||
data->secondarysocket = portsock;
|
||||
|
||||
memset((char *)&sa, 0, sizeof(sa));
|
||||
memcpy((char *)&sa.sin_addr,
|
||||
h->h_addr,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue