summaryrefslogtreecommitdiff
path: root/content/llcache.c
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2010-12-13 08:16:32 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2010-12-13 08:16:32 +0000
commitf40da966ad9ee252bb2ce7aeea35bd36e95084f9 (patch)
treec813ce99f23712975724739ece48339c6d0535a4 /content/llcache.c
parent702c94bb304a3eb306aa4a3bc4d764724f97caa6 (diff)
downloadnetsurf-f40da966ad9ee252bb2ce7aeea35bd36e95084f9.tar.gz
netsurf-f40da966ad9ee252bb2ce7aeea35bd36e95084f9.tar.bz2
We cannot invalidate a user's next/prev pointers when removing it from an object, as it may be the target of iteration
svn path=/trunk/netsurf/; revision=11047
Diffstat (limited to 'content/llcache.c')
-rw-r--r--content/llcache.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/content/llcache.c b/content/llcache.c
index 0b45c3e31..21dcd9f38 100644
--- a/content/llcache.c
+++ b/content/llcache.c
@@ -1193,11 +1193,11 @@ nserror llcache_object_remove_user(llcache_object *object,
if (user->next != NULL)
user->next->prev = user->prev;
-
-#ifndef NDEBUG
- user->next = user->prev = NULL;
-#endif
-
+
+ /* Do not invalidate user's prev/next pointers here
+ * We rely on them remaining valid if it's currently
+ * the target of an iterator */
+
#ifdef LLCACHE_TRACE
LOG(("Removing user %p from %p", user, object));
#endif