mirror of
https://github.com/curl/curl.git
synced 2026-08-02 00:40:27 +03:00
tool: copy origin for 429 list so it can be used even after transfers are freed
This commit is contained in:
parent
2e59f65e4d
commit
8c31029f9e
1 changed files with 2 additions and 1 deletions
|
|
@ -226,7 +226,7 @@ static struct curl_429_list *curl_429_delay_set(struct curl_429_list *list,
|
|||
new_item = curlx_malloc(sizeof(struct curl_429_list));
|
||||
if(!new_item)
|
||||
return NULL;
|
||||
new_item->origin = origin;
|
||||
new_item->origin = curlx_strdup(origin);
|
||||
if(!new_item->origin) {
|
||||
curlx_free(new_item);
|
||||
return NULL;
|
||||
|
|
@ -271,6 +271,7 @@ static void curl_429_delay_free_all(struct curl_429_list *list)
|
|||
item = list;
|
||||
do {
|
||||
next = item->next;
|
||||
curlx_free(item->origin);
|
||||
curlx_free(item);
|
||||
item = next;
|
||||
} while(next);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue