summaryrefslogtreecommitdiff
path: root/content/fetch.c
diff options
context:
space:
mode:
authorMichael Drake <michael.drake@codethink.co.uk>2020-03-12 17:22:28 +0000
committerMichael Drake <michael.drake@codethink.co.uk>2020-03-12 17:22:28 +0000
commitc5aaf45d8eb7e303c26eaa1eb8474ddaabe42221 (patch)
tree8530725bf4e7868851949e20044677480b0ae852 /content/fetch.c
parentca29c3b512aed1ab2c3ec98001fe1569cb47faf7 (diff)
downloadnetsurf-c5aaf45d8eb7e303c26eaa1eb8474ddaabe42221.tar.gz
netsurf-c5aaf45d8eb7e303c26eaa1eb8474ddaabe42221.tar.bz2
Fetch: Squash use of uninitialised value in fetch_send_callback()
The `last_msg` member of `struct fetch` was not initialised on creation of the structure.
Diffstat (limited to 'content/fetch.c')
-rw-r--r--content/fetch.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/content/fetch.c b/content/fetch.c
index 807e811c4..4cc7859fe 100644
--- a/content/fetch.c
+++ b/content/fetch.c
@@ -463,7 +463,7 @@ fetch_start(nsurl *url,
lwc_string *scheme;
bool match;
- fetch = malloc(sizeof (*fetch));
+ fetch = calloc(1, sizeof (*fetch));
if (fetch == NULL) {
return NSERROR_NOMEM;
}
@@ -487,13 +487,6 @@ fetch_start(nsurl *url,
fetch->url = nsurl_ref(url);
fetch->verifiable = verifiable;
fetch->p = p;
- fetch->http_code = 0;
- fetch->r_prev = NULL;
- fetch->r_next = NULL;
- fetch->referer = NULL;
- fetch->send_referer = false;
- fetch->fetcher_handle = NULL;
- fetch->fetch_is_active = false;
fetch->host = nsurl_get_component(url, NSURL_HOST);
if (referer != NULL) {