summaryrefslogtreecommitdiff
path: root/content/fetch.c
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2009-07-29 18:51:35 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2009-07-29 18:51:35 +0000
commitd2c29dbe955ab220a11076fe128a2a41b3d48869 (patch)
treef58582195d8b9aff1a031b6ec19465593d89ac6e /content/fetch.c
parentb18c0b0eca1a06b95660749e00648117526b1118 (diff)
downloadnetsurf-d2c29dbe955ab220a11076fe128a2a41b3d48869.tar.gz
netsurf-d2c29dbe955ab220a11076fe128a2a41b3d48869.tar.bz2
Keep a copy of the next_fetcher pointer to avoid a situation where the fetch gets
freed during the poll routine and the next pointer can no longer be read. svn path=/trunk/netsurf/; revision=8898
Diffstat (limited to 'content/fetch.c')
-rw-r--r--content/fetch.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/content/fetch.c b/content/fetch.c
index f9414172b..71c7bda65 100644
--- a/content/fetch.c
+++ b/content/fetch.c
@@ -493,6 +493,7 @@ void fetch_free(struct fetch *f)
void fetch_poll(void)
{
scheme_fetcher *fetcher = fetchers;
+ struct fetch *next_fetcher;
fetch_dispatch_jobs();
@@ -500,8 +501,9 @@ void fetch_poll(void)
return; /* No point polling, there's no fetch active. */
while (fetcher != NULL) {
/* LOG(("Polling fetcher for %s", fetcher->scheme_name)); */
+ next_fetcher = fetcher->next_fetcher;
fetcher->poll_fetcher(fetcher->scheme_name);
- fetcher = fetcher->next_fetcher;
+ fetcher = next_fetcher;
}
}