mirror of
https://github.com/moparisthebest/curl
synced 2024-11-10 19:45:04 -05:00
Gautam Mani found a socket descriptor leak that happened when FTP transfers
failed and you reinvoked curl_easy_perform().
This commit is contained in:
parent
307d0effe2
commit
d866716565
@ -1414,6 +1414,13 @@ CURLcode Curl_perform(struct SessionHandle *data)
|
|||||||
if(!res && res2)
|
if(!res && res2)
|
||||||
res = res2;
|
res = res2;
|
||||||
|
|
||||||
|
if(conn && (-1 !=conn->secondarysocket)) {
|
||||||
|
/* if we failed anywhere, we must clean up the secondary socket if it
|
||||||
|
was used */
|
||||||
|
sclose(conn->secondarysocket);
|
||||||
|
conn->secondarysocket=-1;
|
||||||
|
}
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user