diff --git a/bin/varnishd/storage/storage_simple.c b/bin/varnishd/storage/storage_simple.c index c94dcccb455..b91475bbbd6 100644 --- a/bin/varnishd/storage/storage_simple.c +++ b/bin/varnishd/storage/storage_simple.c @@ -288,6 +288,9 @@ sml_objfree(struct worker *wrk, struct objcore *oc) CHECK_OBJ_NOTNULL(st, STORAGE_MAGIC); FINI_OBJ(o); + if (oc->boc != NULL) + assert(oc->refcnt >= 2); + if (oc->boc != NULL) sml_bocfini(stv, oc->boc); else if (stv->lru != NULL)