Skip to content
Snippets Groups Projects
Commit bb0aba34 authored by Gisle Vanem's avatar Gisle Vanem
Browse files

Ensure thread handle is closed too.

parent 1dc0ce95
No related branches found
No related tags found
No related merge requests found
......@@ -299,7 +299,7 @@ static unsigned __stdcall getaddrinfo_thread (void *arg)
#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)
......@@ -321,6 +321,9 @@ 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;
......@@ -481,8 +484,6 @@ CURLcode Curl_wait_for_resolv(struct connectdata *conn,
TRACE(("elapsed %lu ms\n", GetTickCount()-ticks));
CloseHandle(td->thread_hnd);
if(entry)
*entry = conn->async.dns;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment