quiche: fix verbose message when ip quadruple cannot be obtained.

Reported in Joshua's sarif data

Closes #18726
This commit is contained in:
Stefan Eissing 2025-09-25 12:46:09 +02:00 committed by Daniel Stenberg
parent ee2dd2d6cb
commit 36eb26381c
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -1432,9 +1432,11 @@ out:
if(result && result != CURLE_AGAIN) {
struct ip_quadruple ip;
Curl_cf_socket_peek(cf->next, data, NULL, NULL, &ip);
infof(data, "connect to %s port %u failed: %s",
ip.remote_ip, ip.remote_port, curl_easy_strerror(result));
if(!Curl_cf_socket_peek(cf->next, data, NULL, NULL, &ip))
infof(data, "connect to %s port %u failed: %s",
ip.remote_ip, ip.remote_port, curl_easy_strerror(result));
else
infof(data, "connect failed: %s", curl_easy_strerror(result));
}
#endif
return result;