]> err.no Git - varnish/commitdiff
Remove object from LRU list before freeing it; this does not entirely
authordes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 17 Jul 2007 16:56:21 +0000 (16:56 +0000)
committerdes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 17 Jul 2007 16:56:21 +0000 (16:56 +0000)
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

index b41df8a1b7de089876aa944513cac28ac536e9b8..f0be07f8a2ed6643e822c45ea5a3806159b570b5 100644 (file)
@@ -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--;