mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
retr.c: Fix two memory leaks when proxy URL is bad
Reported by: Coverity bug 1188047
This commit is contained in:
parent
524f26a200
commit
735cc220e3
@ -772,6 +772,8 @@ retrieve_url (struct url * orig_parsed, const char *origurl, char **file,
|
|||||||
proxy, error);
|
proxy, error);
|
||||||
xfree (url);
|
xfree (url);
|
||||||
xfree (error);
|
xfree (error);
|
||||||
|
xfree (proxy);
|
||||||
|
iri_free (pi);
|
||||||
RESTORE_METHOD;
|
RESTORE_METHOD;
|
||||||
result = PROXERR;
|
result = PROXERR;
|
||||||
goto bail;
|
goto bail;
|
||||||
@ -781,6 +783,8 @@ retrieve_url (struct url * orig_parsed, const char *origurl, char **file,
|
|||||||
logprintf (LOG_NOTQUIET, _("Error in proxy URL %s: Must be HTTP.\n"), proxy);
|
logprintf (LOG_NOTQUIET, _("Error in proxy URL %s: Must be HTTP.\n"), proxy);
|
||||||
url_free (proxy_url);
|
url_free (proxy_url);
|
||||||
xfree (url);
|
xfree (url);
|
||||||
|
xfree (proxy);
|
||||||
|
iri_free (pi);
|
||||||
RESTORE_METHOD;
|
RESTORE_METHOD;
|
||||||
result = PROXERR;
|
result = PROXERR;
|
||||||
goto bail;
|
goto bail;
|
||||||
|
Loading…
Reference in New Issue
Block a user