Commit 68e122ad authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

HSH_DerefObjCore() should never be called (currently) on an objcore

with a valid obj.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@5542 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 4324b658
......@@ -298,6 +298,9 @@ exp_timer(struct sess *sp, void *priv)
} else {
WSL(sp->wrk, SLT_ExpKill, 1, "-1 %d",
(int)(oc->timer_when - t));
/* XXX: Should we tell -spersistent ? */
oc->obj = NULL;
HSH_DerefObjCore(sp->wrk, oc);
sp->wrk->stats.n_vampireobject--;
}
......
......@@ -629,6 +629,8 @@ HSH_DerefObjCore(struct worker *wrk, struct objcore *oc)
oh = oc->objhead;
CHECK_OBJ_NOTNULL(oh, OBJHEAD_MAGIC);
AZ(oc->obj);
Lck_Lock(&oh->mtx);
VTAILQ_REMOVE(&oh->objcs, oc, list);
if (oc->flags & OC_F_BUSY)
......
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