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
13
src/http.c
13
src/http.c
@ -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"))
|
||||
c_max_age = strdupdelim (value.b, value.e);
|
||||
{
|
||||
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;
|
||||
}
|
||||
@ -2486,9 +2489,10 @@ open_output_stream (struct http_stat *hs, int count, FILE **fp)
|
||||
*fp = output_stream;
|
||||
|
||||
/* 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;
|
||||
logprintf (LOG_VERBOSE, _("Saving to: %s\n"),
|
||||
HYPHENP (hs->local_file) ? quote ("STDOUT") : quote (hs->local_file));
|
||||
|
||||
return RETROK;
|
||||
}
|
||||
|
||||
/* Set proper type flags based on type string. */
|
||||
@ -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