From: Daniel Stenberg Date: Mon, 13 Oct 2003 12:21:56 +0000 (+0000) Subject: Clear the connection pointer after the async resolve has failed. X-Git-Tag: curl-7_10_8~135 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8341e8e50253784940f085f1973c28a1ad84594a;p=thirdparty%2Fcurl.git Clear the connection pointer after the async resolve has failed. This cures the problem reported by Giuseppe Attardi on October 12, 2003. --- diff --git a/lib/multi.c b/lib/multi.c index 39ab97799d..c0e4760b84 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -370,6 +370,11 @@ CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles) to the WAITCONNECT state */ easy->result = Curl_async_resolved(easy->easy_conn); + if(CURLE_OK != easy->result) + /* if Curl_async_resolved() returns failure, the connection struct + is already freed and gone */ + easy->easy_conn = NULL; /* no more connection */ + easy->state = CURLM_STATE_WAITCONNECT; }