mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-22 22:41:30 +03:00
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:
parent
702c94bb30
commit
f40da966ad
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user