Skip to content
Snippets Groups Projects
Commit 9ee94b3d authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

fixed a leaked file descriptor when PORT failed

parent 2c100371
No related branches found
No related tags found
No related merge requests found
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment