From c2d8ef90422142434f1ba4b053492813623adee4 Mon Sep 17 00:00:00 2001 From: des Date: Tue, 17 Jul 2007 16:56:21 +0000 Subject: [PATCH] Remove object from LRU list before freeing it; this does not entirely eliminate races between the LRU code and the expiry code, but it does make them a lot less likely. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1712 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/cache_hash.c | 1 + 1 file changed, 1 insertion(+) diff --git a/varnish-cache/bin/varnishd/cache_hash.c b/varnish-cache/bin/varnishd/cache_hash.c index b41df8a1..f0be07f8 100644 --- a/varnish-cache/bin/varnishd/cache_hash.c +++ b/varnish-cache/bin/varnishd/cache_hash.c @@ -259,6 +259,7 @@ HSH_Deref(struct object *o) if (o->vary != NULL) free(o->vary); + LRU_Remove(o); HSH_Freestore(o); FREE_OBJ(o); VSL_stats->n_object--; -- 2.39.5