* src/retr.c (retrieve_from_url_list): Fix memory leak

This commit is contained in:
Tim Rühsen 2024-06-09 19:35:30 +02:00
parent afa979b43f
commit 567e67afd2

View File

@ -1186,8 +1186,8 @@ static uerr_t retrieve_from_url_list(struct urlpos *url_list, int *count, struct
{ {
char *filename = NULL, *new_file = NULL, *proxy; char *filename = NULL, *new_file = NULL, *proxy;
int dt = 0; int dt = 0;
struct iri *tmpiri = iri_dup (iri); struct iri *tmpiri;
struct url *parsed_url = NULL; struct url *parsed_url;
if (cur_url->ignore_when_downloading) if (cur_url->ignore_when_downloading)
continue; continue;
@ -1198,6 +1198,7 @@ static uerr_t retrieve_from_url_list(struct urlpos *url_list, int *count, struct
break; break;
} }
tmpiri = iri_dup (iri);
parsed_url = url_parse (cur_url->url->url, NULL, tmpiri, true); parsed_url = url_parse (cur_url->url->url, NULL, tmpiri, true);
proxy = getproxy (cur_url->url); proxy = getproxy (cur_url->url);