In file 'hostthre.c' (Libcurl version 7.14.0) a new thread is
created:
/#ifdef _WIN32_WCE
td->thread_hnd = (HANDLE) CreateThread(NULL, 0,
(LPTHREAD_START_ROUTINE) THREAD_FUNC,
conn, 0, &td->thread_id);
TRACE(("Created thread; %d\n", td->thread_id));
#else
td->thread_hnd = (HANDLE) _beginthreadex(NULL, 0,
THREAD_FUNC,
conn, 0, &td->thread_id);
#endif
The only place that CloseHandle is called on td-
>thread_hnd is in the function 'Curl_wait_for_resolv' in
the same file. HOWEVER, 'Curl_wait_for_resolv' does
not get called when I step through the code. Therefore
thread handles are being leaked.
Keep in mind that CreateThread/_beginthreadex DOES
get called.
My email address is kthyagar@hotmail.com
Thanks,
-Karthi.
Logged In: YES
user_id=1110
I've forwarded this bug report to the libcurl mailing list.
I don't personally have nor develop under Windows.
I assume you have verified emperically that libcurl leaks
this, or only by reading the source?
Can you please provide us with an as simple as possible
source code that uses libcurl and makes this leak occur?
Logged In: YES
user_id=1110
Ok, I'll say this at once: if you don't respond within a few
days, we'll close this report considering it to be bogus.
Logged In: YES
user_id=1110
Gisle Vanem in:
http://curl.haxx.se/mail/lib-2005-06/0059.html
"I looked at this again and think the OP could be right. I've
commited a small patch to close the thread handle in
Curl_destroy_thread_data() just to be sure (moved CloseHandle)."
Closing this report now. Thanks for reporting.