mirror of
https://github.com/curl/curl.git
synced 2026-08-05 01:56:14 +03:00
second try with atexit
This commit is contained in:
parent
984d3bef52
commit
13f10b2fe0
1 changed files with 6 additions and 1 deletions
|
|
@ -730,7 +730,6 @@ static DWORD WINAPI win_stdin_thread_func(void *thread_data)
|
|||
{
|
||||
(void)thread_data;
|
||||
|
||||
atexit(cleanup_tdata);
|
||||
|
||||
for(;;) {
|
||||
DWORD n;
|
||||
|
|
@ -834,6 +833,12 @@ curl_socket_t win32_stdin_read_thread(void)
|
|||
curl_socklen_t socksize = 0;
|
||||
struct sockaddr_in selfaddr;
|
||||
|
||||
/* prevent mem leak warnings */
|
||||
if(atexit(&cleanup_tdata)) {
|
||||
errorf("atexit() error");
|
||||
break;
|
||||
}
|
||||
|
||||
/* Create the listening socket. It is used to create the writing socket by
|
||||
* accepting a connection from the reading socket. */
|
||||
socket_l = CURL_SOCKET(AF_INET, SOCK_STREAM, IPPROTO_TCP);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue