mirror of
https://github.com/curl/curl.git
synced 2026-08-26 17:53:33 +03:00
http: move "oauth_bearer" from connectdata to Curl_easy
Fixes the bug where oauth_bearer gets deallocated when we re-use a connection. Closes #4824
This commit is contained in:
parent
1774dbd74c
commit
dea17b519d
4 changed files with 13 additions and 23 deletions
|
|
@ -721,7 +721,6 @@ static void conn_free(struct connectdata *conn)
|
|||
|
||||
Curl_safefree(conn->user);
|
||||
Curl_safefree(conn->passwd);
|
||||
Curl_safefree(conn->oauth_bearer);
|
||||
Curl_safefree(conn->sasl_authzid);
|
||||
Curl_safefree(conn->options);
|
||||
Curl_safefree(conn->http_proxy.user);
|
||||
|
|
@ -3343,14 +3342,6 @@ static CURLcode create_conn(struct Curl_easy *data,
|
|||
if(result)
|
||||
goto out;
|
||||
|
||||
if(data->set.str[STRING_BEARER]) {
|
||||
conn->oauth_bearer = strdup(data->set.str[STRING_BEARER]);
|
||||
if(!conn->oauth_bearer) {
|
||||
result = CURLE_OUT_OF_MEMORY;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
if(data->set.str[STRING_SASL_AUTHZID]) {
|
||||
conn->sasl_authzid = strdup(data->set.str[STRING_SASL_AUTHZID]);
|
||||
if(!conn->sasl_authzid) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue