summaryrefslogtreecommitdiffstats
path: root/contrib/libs/curl/lib/asyn-thread.c
diff options
context:
space:
mode:
authorrobot-contrib <[email protected]>2022-09-21 14:47:18 +0300
committerrobot-contrib <[email protected]>2022-09-21 14:47:18 +0300
commitf904cb56d9b1584ffcc28e53dec706fe1dc15d6f (patch)
treefe2764cc64c10b674559b367741a172323b52bcd /contrib/libs/curl/lib/asyn-thread.c
parent37a16126ac62d0af47b33d50c786b9adc009f6f3 (diff)
Update contrib/libs/curl to 7.85.0
Diffstat (limited to 'contrib/libs/curl/lib/asyn-thread.c')
-rw-r--r--contrib/libs/curl/lib/asyn-thread.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/contrib/libs/curl/lib/asyn-thread.c b/contrib/libs/curl/lib/asyn-thread.c
index a47aa7a653f..248d63576e0 100644
--- a/contrib/libs/curl/lib/asyn-thread.c
+++ b/contrib/libs/curl/lib/asyn-thread.c
@@ -321,23 +321,28 @@ int init_thread_sync_data(struct thread_data *td,
return 1;
err_exit:
- /* Memory allocation failed */
+#ifndef CURL_DISABLE_SOCKETPAIR
+ if(tsd->sock_pair[0] != CURL_SOCKET_BAD) {
+ sclose(tsd->sock_pair[0]);
+ tsd->sock_pair[0] = CURL_SOCKET_BAD;
+ }
+#endif
destroy_thread_sync_data(tsd);
return 0;
}
-static int getaddrinfo_complete(struct Curl_easy *data)
+static CURLcode getaddrinfo_complete(struct Curl_easy *data)
{
struct thread_sync_data *tsd = conn_thread_sync_data(data);
- int rc;
+ CURLcode result;
- rc = Curl_addrinfo_callback(data, tsd->sock_error, tsd->res);
+ result = Curl_addrinfo_callback(data, tsd->sock_error, tsd->res);
/* The tsd->res structure has been copied to async.dns and perhaps the DNS
cache. Set our copy to NULL so destroy_thread_sync_data doesn't free it.
*/
tsd->res = NULL;
- return rc;
+ return result;
}