#endif
/*
- * Curl_destroy_thread_data() cleans up async resolver data.
+ * Curl_destroy_thread_data() cleans up async resolver data and thread handle.
* Complementary of ares_destroy.
*/
void Curl_destroy_thread_data (struct Curl_async *async)
if (td->event_resolved)
CloseHandle(td->event_resolved);
+ if (td->thread_hnd)
+ CloseHandle(td->thread_hnd);
+
free(async->os_specific);
}
async->hostname = NULL;
TRACE(("elapsed %lu ms\n", GetTickCount()-ticks));
- CloseHandle(td->thread_hnd);
-
if(entry)
*entry = conn->async.dns;