diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 17 | ||||
-rw-r--r-- | src/cookies.c | 5 | ||||
-rw-r--r-- | src/http.c | 10 | ||||
-rw-r--r-- | src/main.c | 2 |
4 files changed, 31 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 71aef6ec..df6deabf 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -2,6 +2,23 @@ * Makefile.am (wget_SOURCES): Remove space-tab indentation. +2014-07-23 Darshit Shah <darnir@gmail.com> + + * http.c (gethttp): Fix a memory leak when retrying authorization + (gethttp): Fix memory leak when trying to parse content disposition headers + (http_loop): Assigning a new value to *local)file without freeing the old + one causes a memory leak + (http_loop): Free the HTTP message and error strings before continuing loop + +2014-07-21 Daniel Stenberg <daniel@haxx.se> + + * main.c (print_help): HTTP Method is a part of the Request not Header + +2014-07-21 Darshit Shah <darnir@gmail.com> + + * cookies.c (check_domain_match): Fix a potential memory leak when checking + cookie domain names + 2014-07-07 Tomas Hozza <thozza@redhat.com> * iri.c (locale_to_utf8): Fix checking of iconv_open return code. diff --git a/src/cookies.c b/src/cookies.c index 76301acc..bf872a88 100644 --- a/src/cookies.c +++ b/src/cookies.c @@ -546,9 +546,12 @@ check_domain_match (const char *cookie_domain, const char *host) xfree (cookie_domain_lower); xfree (host_lower); - return true ? (is_acceptable == 1) : false; + return is_acceptable == 1; no_psl: + /* Cleanup the PSL pointers first */ + xfree (cookie_domain_lower); + xfree (host_lower); #endif /* For efficiency make some elementary checks first */ @@ -2702,6 +2702,7 @@ read_header: resp_free (resp); xfree (head); xfree (auth_stat); + xfree (hs->message); goto retry_with_auth; } else @@ -2762,6 +2763,8 @@ read_header: local_file)); hs->local_file = url_file_name (u, local_file); } + + xfree_null (local_file); } /* TODO: perform this check only once. */ @@ -3726,6 +3729,8 @@ Remote file exists.\n\n")); got_name = true; *dt &= ~HEAD_ONLY; count = 0; /* the retrieve count for HEAD is reset */ + xfree_null (hstat.message); + xfree_null (hstat.error); continue; } /* send_head_first */ } /* !got_head */ @@ -3873,7 +3878,10 @@ Remote file exists.\n\n")); exit: if (ret == RETROK && local_file && !(*local_file)) - *local_file = xstrdup (hstat.local_file); + { + xfree_null (*local_file); + *local_file = xstrdup (hstat.local_file); + } free_hstat (&hstat); return ret; @@ -636,7 +636,7 @@ HTTP options:\n"), N_("\ --post-file=FILE use the POST method; send contents of FILE.\n"), N_("\ - --method=HTTPMethod use method \"HTTPMethod\" in the header.\n"), + --method=HTTPMethod use method \"HTTPMethod\" in the request.\n"), N_("\ --body-data=STRING Send STRING as data. --method MUST be set.\n"), N_("\ |