mirror of
https://github.com/curl/curl.git
synced 2026-08-26 21:13:34 +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;
|
(void)thread_data;
|
||||||
|
|
||||||
atexit(cleanup_tdata);
|
|
||||||
|
|
||||||
for(;;) {
|
for(;;) {
|
||||||
DWORD n;
|
DWORD n;
|
||||||
|
|
@ -834,6 +833,12 @@ curl_socket_t win32_stdin_read_thread(void)
|
||||||
curl_socklen_t socksize = 0;
|
curl_socklen_t socksize = 0;
|
||||||
struct sockaddr_in selfaddr;
|
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
|
/* Create the listening socket. It is used to create the writing socket by
|
||||||
* accepting a connection from the reading socket. */
|
* accepting a connection from the reading socket. */
|
||||||
socket_l = CURL_SOCKET(AF_INET, SOCK_STREAM, IPPROTO_TCP);
|
socket_l = CURL_SOCKET(AF_INET, SOCK_STREAM, IPPROTO_TCP);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue