diff options
author | Darshit Shah <darnir@gmail.com> | 2014-09-14 16:57:15 +0530 |
---|---|---|
committer | Darshit Shah <darnir@gmail.com> | 2014-09-14 16:57:15 +0530 |
commit | af702340a1f3b462d0224968602c2b2974f218d6 (patch) | |
tree | a1d352f6d30505ecc856d5b7561d4dc001b3a891 /src | |
parent | 6140b1b6e3831a35fd2cf4536fda741a4dcc9019 (diff) | |
parent | f8e9a64ec7445d22f67f1817043d5807c4766556 (diff) | |
download | wget-parallel-wget.tar.gz |
Merge remote-tracking branch 'origin/master' into parallel-wgetparallel-wget
Conflicts:
src/http.c
testenv/Makefile.am
testenv/Test--https.py
testenv/Test--spider-r.py
testenv/Test-Content-disposition-2.py
testenv/Test-Content-disposition.py
testenv/Test-Head.py
testenv/Test-O.py
testenv/Test-Parallel-Proto.py
testenv/Test-Post.py
testenv/Test-Proto.py
testenv/Test-auth-basic-fail.py
testenv/Test-auth-basic.py
testenv/Test-auth-both.py
testenv/Test-auth-digest.py
testenv/Test-auth-no-challenge-url.py
testenv/Test-auth-no-challenge.py
testenv/Test-auth-retcode.py
testenv/Test-auth-with-content-disposition.py
testenv/Test-c-full.py
testenv/Test-cookie-401.py
testenv/Test-cookie-domain-mismatch.py
testenv/Test-cookie-expires.py
testenv/Test-cookie.py
testenv/conf/__init__.py
testenv/conf/authentication.py
testenv/conf/expect_header.py
testenv/conf/expected_files.py
testenv/conf/expected_ret_code.py
testenv/conf/files_crawled.py
testenv/conf/hook_sample.py
testenv/conf/local_files.py
testenv/conf/reject_header.py
testenv/conf/response.py
testenv/conf/send_header.py
testenv/conf/server_files.py
testenv/conf/urls.py
testenv/conf/wget_commands.py
testenv/misc/colour_terminal.py
testenv/server/http/http_server.py
testenv/test/base_test.py
testenv/test/http_test.py
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_("\ |