From: des Date: Tue, 17 Jul 2007 16:56:21 +0000 (+0000) Subject: Remove object from LRU list before freeing it; this does not entirely X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c2d8ef90422142434f1ba4b053492813623adee4;p=varnish 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 --- 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--;