r4516 - trunk/varnish-cache/bin/varnishd
phk at projects.linpro.no
phk at projects.linpro.no
Mon Feb 1 10:00:13 CET 2010
Author: phk
Date: 2010-02-01 10:00:13 +0100 (Mon, 01 Feb 2010)
New Revision: 4516
Modified:
trunk/varnish-cache/bin/varnishd/cache_expire.c
Log:
Don't nuke the objcore object pointer when we deref the last
object on the LRU list, we may not be holding the last reference.
Fixes: #634
Tip of hat to: Matt Page for execellent diagnosis & patch.
Modified: trunk/varnish-cache/bin/varnishd/cache_expire.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_expire.c 2010-02-01 08:58:17 UTC (rev 4515)
+++ trunk/varnish-cache/bin/varnishd/cache_expire.c 2010-02-01 09:00:13 UTC (rev 4516)
@@ -324,6 +324,7 @@
EXP_NukeOne(const struct sess *sp, const struct lru *lru)
{
struct objcore *oc;
+ struct object *o;
/*
* Find the first currently unused object on the LRU.
@@ -361,7 +362,8 @@
return (-1);
WSL(sp->wrk, SLT_ExpKill, 0, "%u LRU", oc->obj->xid);
- HSH_Deref(sp->wrk, &(oc->obj));
+ o = oc->obj;
+ HSH_Deref(sp->wrk, &o);
return (1);
}
More information about the varnish-commit
mailing list