← Commit list

e8c1023b00

Daniel Stenberg
Daniel Stenberg
2026-05-17
SUCCESS Duration: 250s

Subject

connect: remove deref of freed pointer in trace call

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

lib/connect.c+5 -2
@@ -389,10 +389,13 @@ connect_sub_chain:
cf->conn->socks_proxy.proxytype,
cf->conn->socks_proxy.creds);
+ if(result) {
+ /* 'dest' might be freed now so it can't be dereferenced */
+ CURL_TRC_CF(data, cf, "added SOCKS filter failed -> %d", result);
+ return result;
+ }
CURL_TRC_CF(data, cf, "added SOCKS filter to %s:%u -> %d",
dest->hostname, dest->port, result);
- if(result)
- return result;
ctx->state = CF_SETUP_CNNCT_SOCKS;
if(!cf->next || !cf->next->connected)
goto connect_sub_chain;