summaryrefslogtreecommitdiff
path: root/src/http.c
diff options
context:
space:
mode:
authorDarshit Shah <darnir@gmail.com>2014-09-14 16:57:15 +0530
committerDarshit Shah <darnir@gmail.com>2014-09-14 16:57:15 +0530
commitaf702340a1f3b462d0224968602c2b2974f218d6 (patch)
treea1d352f6d30505ecc856d5b7561d4dc001b3a891 /src/http.c
parent6140b1b6e3831a35fd2cf4536fda741a4dcc9019 (diff)
parentf8e9a64ec7445d22f67f1817043d5807c4766556 (diff)
downloadwget-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/http.c')
-rw-r--r--src/http.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/http.c b/src/http.c
index 61034607..fc79ecf5 100644
--- a/src/http.c
+++ b/src/http.c
@@ -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;