mirror of
https://github.com/curl/curl.git
synced 2026-06-12 18:45:37 +03:00
connect: remove deref of freed pointer in trace call
Spotted by CodeSonar Closes #21649
This commit is contained in:
parent
d74c0ada4e
commit
e8c1023b00
1 changed files with 5 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue