From 8341e8e50253784940f085f1973c28a1ad84594a Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 13 Oct 2003 12:21:56 +0000 Subject: Clear the connection pointer after the async resolve has failed. This cures the problem reported by Giuseppe Attardi on October 12, 2003. --- lib/multi.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/multi.c') diff --git a/lib/multi.c b/lib/multi.c index 39ab97799..c0e4760b8 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; } -- cgit v1.2.3