[master] cc3cd17b5 Assert

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Wed Apr 10 16:28:06 UTC 2019


commit cc3cd17b51e289822fcdc46b76d03fd5d48e632d
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Wed Apr 10 18:26:42 2019 +0200

    Assert

diff --git a/bin/varnishd/cache/cache_hash.c b/bin/varnishd/cache/cache_hash.c
index 5576ca6fd..0d22eeae8 100644
--- a/bin/varnishd/cache/cache_hash.c
+++ b/bin/varnishd/cache/cache_hash.c
@@ -774,6 +774,8 @@ HSH_Cancel(struct worker *wrk, struct objcore *oc, struct boc *boc)
 {
 	struct boc *bocref = NULL;
 
+	CHECK_OBJ_NOTNULL(oc, OBJCORE_MAGIC);
+
 	if ((oc->flags & (OC_F_PRIVATE | OC_F_HFM | OC_F_HFP)) == 0)
 		return;
 
@@ -784,6 +786,8 @@ HSH_Cancel(struct worker *wrk, struct objcore *oc, struct boc *boc)
 	if (boc == NULL)
 		bocref = boc = HSH_RefBoc(oc);
 
+	CHECK_OBJ_ORNULL(boc, BOC_MAGIC);
+
 	if (oc->flags & OC_F_HFP)
 		AN(oc->flags & OC_F_HFM);
 


More information about the varnish-commit mailing list