mirror of
https://github.com/curl/curl.git
synced 2026-08-24 21:13:40 +03:00
bufref: add Curl_bufref_dup that returns a strdup()ed version
Cleans up a common pattern somewhat. Implemented as a macro. Closes #19834
This commit is contained in:
parent
d7928029fc
commit
d517efe5bd
6 changed files with 20 additions and 8 deletions
|
|
@ -2011,7 +2011,7 @@ static CURLMcode state_performing(struct Curl_easy *data,
|
|||
data->state.errorbuf = FALSE;
|
||||
if(!newurl)
|
||||
/* typically for HTTP_1_1_REQUIRED error on first flight */
|
||||
newurl = curlx_strdup(Curl_bufref_ptr(&data->state.url));
|
||||
newurl = Curl_bufref_dup(&data->state.url);
|
||||
if(!newurl) {
|
||||
result = CURLE_OUT_OF_MEMORY;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue