From f40da966ad9ee252bb2ce7aeea35bd36e95084f9 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Mon, 13 Dec 2010 08:16:32 +0000 Subject: 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 --- content/llcache.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'content') 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 -- cgit v1.2.3