From: Stefan Eissing Date: Mon, 8 Jan 2024 14:02:12 +0000 (+0100) Subject: url: init conn->sockfd and writesockfd to CURL_SOCKET_BAD X-Git-Tag: curl-8_6_0~132 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d0cb2c7a1f09c17442987be8937cd2ac3708e524;p=thirdparty%2Fcurl.git url: init conn->sockfd and writesockfd to CURL_SOCKET_BAD Also add more tracing to test 19 Follow-up to a0f9480 Fixes #12657 Closes #12659 --- diff --git a/lib/url.c b/lib/url.c index 7764668dc2..e60020bc20 100644 --- a/lib/url.c +++ b/lib/url.c @@ -1356,6 +1356,8 @@ static struct connectdata *allocate_conn(struct Curl_easy *data) conn->sock[FIRSTSOCKET] = CURL_SOCKET_BAD; /* no file descriptor */ conn->sock[SECONDARYSOCKET] = CURL_SOCKET_BAD; /* no file descriptor */ + conn->sockfd = CURL_SOCKET_BAD; + conn->writesockfd = CURL_SOCKET_BAD; conn->connection_id = -1; /* no ID */ conn->port = -1; /* unknown at this point */ conn->remote_port = -1; /* unknown at this point */ diff --git a/tests/data/test19 b/tests/data/test19 index 265a74ad88..cf735a42f3 100644 --- a/tests/data/test19 +++ b/tests/data/test19 @@ -24,7 +24,7 @@ http attempt connect to non-listening socket -%HOSTIP:%NOLISTENPORT +--trace-config all %HOSTIP:%NOLISTENPORT