mirror of
https://github.com/curl/curl.git
synced 2026-08-25 15:33:39 +03:00
url: check Curl_conncache_add_conn return code
... it was previously unchecked in two places and thus errors could remain undetected and cause trouble. Closes #2681
This commit is contained in:
parent
13120f28b3
commit
f762fec323
3 changed files with 12 additions and 15 deletions
|
|
@ -4308,7 +4308,9 @@ static CURLcode create_conn(struct Curl_easy *data,
|
|||
conn->data = data;
|
||||
conn->bits.tcpconnect[FIRSTSOCKET] = TRUE; /* we are "connected */
|
||||
|
||||
Curl_conncache_add_conn(data->state.conn_cache, conn);
|
||||
result = Curl_conncache_add_conn(data->state.conn_cache, conn);
|
||||
if(result)
|
||||
goto out;
|
||||
|
||||
/*
|
||||
* Setup whatever necessary for a resumed transfer
|
||||
|
|
@ -4531,7 +4533,9 @@ static CURLcode create_conn(struct Curl_easy *data,
|
|||
* This is a brand new connection, so let's store it in the connection
|
||||
* cache of ours!
|
||||
*/
|
||||
Curl_conncache_add_conn(data->state.conn_cache, conn);
|
||||
result = Curl_conncache_add_conn(data->state.conn_cache, conn);
|
||||
if(result)
|
||||
goto out;
|
||||
}
|
||||
|
||||
#if defined(USE_NTLM)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue