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
This commit is contained in:
John Mark Bell 2010-12-13 08:16:32 +00:00
parent 702c94bb30
commit f40da966ad

View File

@ -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