the multi-threaded resolver does wrong
struct connectdata *conn = (struct connectdata *)arg;
struct Curl_dns_entry *dns = NULL;
- conn->async.done = TRUE;
conn->async.status = status;
if(CURL_ASYNC_SUCCESS == status) {
conn->async.dns = dns;
+ /* Set async.done TRUE last in this function since it may be used multi-
+ threaded and once this is TRUE the other thread may read fields from the
+ async struct */
+ conn->async.done = TRUE;
+
/* ipv4: The input hostent struct will be freed by ares when we return from
this function */
}