From 8773a28b015330ba72d2aaf7e28c223356c8079c Mon Sep 17 00:00:00 2001 From: Nils Goroll Date: Wed, 19 Jul 2023 15:00:06 +0200 Subject: [PATCH] Peace of mind for Martin Ref https://github.com/varnishcache/varnish-cache/pull/3954#issuecomment-1640305140 --- bin/varnishd/storage/storage_simple.c | 3 +++ 1 file changed, 3 insertions(+) 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)