diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-11-26 17:28:39 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-11-26 17:28:39 +0100 |
commit | 54cb9eaf47ea9976bc6b19ac60ffd68bc7572200 (patch) | |
tree | 250464d0a65fa2ed24bbe48a1235c2b64d792de6 /lib/socks.c | |
parent | d6ced230fe180588aee19ef2daf1ee55bc8de6d3 (diff) | |
download | curl-54cb9eaf47ea9976bc6b19ac60ffd68bc7572200.tar.gz |
socks: check for entries with the right port numberbagder/macos-cares
The resolve call is done with the right port number, but the subsequent
check used the wrong one, which then could find a previous resolve which
would return and leave the fresh resolve "incomplete" and leaking
memory.
Fixes #6247
Diffstat (limited to 'lib/socks.c')
-rw-r--r-- | lib/socks.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/socks.c b/lib/socks.c index d9f67ec57..a2d1e621f 100644 --- a/lib/socks.c +++ b/lib/socks.c @@ -771,7 +771,7 @@ CURLproxycode Curl_SOCKS5(const char *proxy_user, case CONNECT_RESOLVING: /* check if we have the name resolved by now */ - dns = Curl_fetch_addr(conn, hostname, (int)conn->port); + dns = Curl_fetch_addr(conn, hostname, remote_port); if(dns) { #ifdef CURLRES_ASYNCH |