Fixed an out of memory problem that caused torture test failures in tests

706 and 707.
This commit is contained in:
Dan Fandrich
2008-09-02 23:12:00 +00:00
parent 0994d7811f
commit 29ec219b82
2 changed files with 12 additions and 2 deletions

View File

@@ -1825,6 +1825,11 @@ static CURLcode ftp_state_pasv_resp(struct connectdata *conn,
connectport =
(unsigned short)conn->port; /* we connect to the proxy's port */
if(!addr) {
failf(data, "Can't resolve proxy host %s:%d",
conn->proxy.name, connectport);
return CURLE_FTP_CANT_GET_HOST;
}
}
else {
/* normal, direct, ftp connection */
@@ -1833,11 +1838,12 @@ static CURLcode ftp_state_pasv_resp(struct connectdata *conn,
/* BLOCKING */
rc = Curl_wait_for_resolv(conn, &addr);
connectport = newport; /* we connect to the remote port */
if(!addr) {
failf(data, "Can't resolve new host %s:%d", newhost, newport);
failf(data, "Can't resolve new host %s:%d", newhost, connectport);
return CURLE_FTP_CANT_GET_HOST;
}
connectport = newport; /* we connect to the remote port */
}
result = Curl_connecthost(conn,