[master] a390e0803 Attempt again to silence coverity

Martin Blix Grydeland martin at varnish-software.com
Tue Aug 4 11:38:06 UTC 2020


commit a390e0803475d3132f2dc4d447a02507c4b352b5
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date:   Tue Aug 4 13:37:05 2020 +0200

    Attempt again to silence coverity

diff --git a/bin/varnishd/cache/cache_expire.c b/bin/varnishd/cache/cache_expire.c
index 85ee9ee1f..ae9cb2314 100644
--- a/bin/varnishd/cache/cache_expire.c
+++ b/bin/varnishd/cache/cache_expire.c
@@ -208,6 +208,7 @@ EXP_Insert(struct worker *wrk, struct objcore *oc)
 	if (remove_race) {
 		ObjSendEvent(wrk, oc, OEV_EXPIRE);
 		tmpoc = oc;
+		assert(oc->refcnt >= 2); /* Silence coverity */
 		(void)HSH_DerefObjCore(wrk, &tmpoc, 0);
 		AZ(tmpoc);
 		assert(oc->refcnt >= 1); /* Silence coverity */


More information about the varnish-commit mailing list