aboutsummaryrefslogtreecommitdiff
path: root/lib/multi.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2003-10-13 12:21:56 +0000
committerDaniel Stenberg <daniel@haxx.se>2003-10-13 12:21:56 +0000
commit8341e8e50253784940f085f1973c28a1ad84594a (patch)
tree840111968cb1dc254e5ae1d5784e6fb2412950fb /lib/multi.c
parente85881d7ec4b0ee18b63de102d599a588a61fdb6 (diff)
Clear the connection pointer after the async resolve has failed.
This cures the problem reported by Giuseppe Attardi on October 12, 2003.
Diffstat (limited to 'lib/multi.c')
-rw-r--r--lib/multi.c5
1 files changed, 5 insertions, 0 deletions
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;
}