mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
Fix leaks found by Coverity
* src/http.c (parse_strict_transport_security): Free c_max_age (open_output_stream): Fix indentation * src/iri.c (locale_to_utf8): Free new
This commit is contained in:
parent
398699c438
commit
88a1a79bc1
@ -1274,7 +1274,10 @@ parse_strict_transport_security (const char *header, time_t *max_age, bool *incl
|
||||
for (; extract_param (&header, &name, &value, ';', &is_url_encoded); is_url_encoded = false)
|
||||
{
|
||||
if (BOUNDED_EQUAL_NO_CASE (name.b, name.e, "max-age"))
|
||||
{
|
||||
xfree(c_max_age);
|
||||
c_max_age = strdupdelim (value.b, value.e);
|
||||
}
|
||||
else if (BOUNDED_EQUAL_NO_CASE (name.b, name.e, "includeSubDomains"))
|
||||
is = true;
|
||||
}
|
||||
@ -2488,6 +2491,7 @@ open_output_stream (struct http_stat *hs, int count, FILE **fp)
|
||||
/* Print fetch message, if opt.verbose. */
|
||||
logprintf (LOG_VERBOSE, _("Saving to: %s\n"),
|
||||
HYPHENP (hs->local_file) ? quote ("STDOUT") : quote (hs->local_file));
|
||||
|
||||
return RETROK;
|
||||
}
|
||||
|
||||
@ -2625,6 +2629,7 @@ metalink_from_http (const struct response *resp, const struct http_stat *hs,
|
||||
logprintf (LOG_NOTQUIET, _("When downloading signature:\n"
|
||||
"%s: %s.\n"), urlstr, error);
|
||||
xfree (error);
|
||||
iri_free (iri);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user