diff --git a/lib/ftp.c b/lib/ftp.c index 9bfcab3da0..27e4c8aadd 100644 --- a/lib/ftp.c +++ b/lib/ftp.c @@ -1031,6 +1031,7 @@ static CURLcode ftp_state_use_port(struct Curl_easy *data, if(result) { if(result == CURLE_OUT_OF_MEMORY) goto out; + result = CURLE_FTP_PORT_FAILED; error = SOCKERRNO; continue; }