r1712 - trunk/varnish-cache/bin/varnishd

des at projects.linpro.no des at projects.linpro.no
Tue Jul 17 18:56:21 CEST 2007


Author: des
Date: 2007-07-17 18:56:21 +0200 (Tue, 17 Jul 2007)
New Revision: 1712

Modified:
   trunk/varnish-cache/bin/varnishd/cache_hash.c
Log:
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.


Modified: trunk/varnish-cache/bin/varnishd/cache_hash.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_hash.c	2007-07-17 13:05:08 UTC (rev 1711)
+++ trunk/varnish-cache/bin/varnishd/cache_hash.c	2007-07-17 16:56:21 UTC (rev 1712)
@@ -259,6 +259,7 @@
 	if (o->vary != NULL)
 		free(o->vary);
 
+	LRU_Remove(o);
 	HSH_Freestore(o);
 	FREE_OBJ(o);
 	VSL_stats->n_object--;




More information about the varnish-commit mailing list