diff options
author | Daniel Stenberg <daniel@haxx.se> | 2006-09-16 20:57:59 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2006-09-16 20:57:59 +0000 |
commit | c001ed53fa89f203e3d6aa402e9a9126dc34f5b1 (patch) | |
tree | 81b8d5fd984b4128e0522240e6c78b24fafbabcf | |
parent | 39e01e9349c0ea9c9a4f0938d97ba301ef543439 (diff) |
Armel Asselin - When the easy handle is removed from the multi while libcurl
is still trying to resolve the host name, it seems that the ftp struct is not
yet initialized, but the removal action calls Curl_done() which calls
Curl_ftp_done. So we simply return success from there if no ftp pointer is
set.
-rw-r--r-- | lib/ftp.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -2954,6 +2954,15 @@ CURLcode Curl_ftp_done(struct connectdata *conn, CURLcode status) char *path_to_use = data->reqdata.path; struct Curl_transfer_keeper *k = &data->reqdata.keep; + if(!ftp) + /* When the easy handle is removed from the multi while libcurl is still + * trying to resolve the host name, it seems that the ftp struct is not + * yet initialized, but the removal action calls Curl_done() which calls + * this function. So we simply return success if no ftp pointer is set. + */ + return CURLE_OK; + + if (conn->sec_path) path_to_use = conn->sec_path; |