Commit 2a401cb2 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

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.



git-svn-id: http://www.varnish-cache.org/svn/trunk@4516 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 83068121
......@@ -324,6 +324,7 @@ int
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 @@ EXP_NukeOne(const struct sess *sp, const struct lru *lru)
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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment