summaryrefslogtreecommitdiff
path: root/content/fetchers/about.c
diff options
context:
space:
mode:
Diffstat (limited to 'content/fetchers/about.c')
-rw-r--r--content/fetchers/about.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/content/fetchers/about.c b/content/fetchers/about.c
index c4a376a29..9def04a2c 100644
--- a/content/fetchers/about.c
+++ b/content/fetchers/about.c
@@ -353,10 +353,6 @@ static void fetch_about_poll(const char *scheme)
/* Iterate over ring, processing each pending fetch */
c = ring;
do {
- /* Take a copy of the next pointer as we may destroy
- * the ring item we're currently processing */
- next = c->r_next;
-
/* Ignore fetches that have been flagged as locked.
* This allows safe re-entrant calls to this function.
* Re-entrancy can occur if, as a result of a callback,
@@ -364,6 +360,7 @@ static void fetch_about_poll(const char *scheme)
* again.
*/
if (c->locked == true) {
+ next = c->r_next;
continue;
}
@@ -373,6 +370,10 @@ static void fetch_about_poll(const char *scheme)
c->handler(c);
}
+ /* Compute next fetch item at the last possible moment
+ * as processing this item may have added to the ring
+ */
+ next = c->r_next;
fetch_remove_from_queues(c->fetchh);
fetch_free(c->fetchh);