[master] f10f433d7 Minor issues found by Coverity

Poul-Henning Kamp phk at FreeBSD.org
Tue Aug 23 10:32:08 UTC 2022


commit f10f433d77297cc884056db19235bf3cc6de618b
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Tue Aug 23 10:30:59 2022 +0000

    Minor issues found by Coverity

diff --git a/bin/varnishd/cache/cache_fetch.c b/bin/varnishd/cache/cache_fetch.c
index 56fef17c6..40b304fa7 100644
--- a/bin/varnishd/cache/cache_fetch.c
+++ b/bin/varnishd/cache/cache_fetch.c
@@ -444,7 +444,7 @@ vbf_stp_startfetch(struct worker *wrk, struct busyobj *bo)
 
 	http_VSL_log(bo->beresp);
 
-	if (bo->htc->body_status == BS_ERROR) {
+	if (bo->htc != NULL && bo->htc->body_status == BS_ERROR) {
 		bo->htc->doclose = SC_RX_BODY;
 		vbf_cleanup(bo);
 		VSLb(bo->vsl, SLT_Error, "Body cannot be fetched");
diff --git a/bin/varnishd/common/common_vext.c b/bin/varnishd/common/common_vext.c
index fba153627..169cb13ee 100644
--- a/bin/varnishd/common/common_vext.c
+++ b/bin/varnishd/common/common_vext.c
@@ -163,7 +163,6 @@ vext_cleanup(int do_unlink)
 	struct vext *vp;
 
 	VTAILQ_FOREACH(vp, &vext_list, list) {
-		fprintf(stderr, "ee3 %s\n", VSB_data(vp->vsb));
 		if (vp->vsb != NULL && VSB_len(vp->vsb) > 0) {
 			if (do_unlink)
 				XXXAZ(unlink(VSB_data(vp->vsb)));
diff --git a/bin/varnishd/http2/cache_http2_send.c b/bin/varnishd/http2/cache_http2_send.c
index 2b66615ca..791cfcbe2 100644
--- a/bin/varnishd/http2/cache_http2_send.c
+++ b/bin/varnishd/http2/cache_http2_send.c
@@ -409,7 +409,7 @@ void
 H2_Send(struct worker *wrk, struct h2_req *r2, h2_frame ftyp, uint8_t flags,
     uint32_t len, const void *ptr, uint64_t *counter)
 {
-	uint64_t dummy_counter;
+	uint64_t dummy_counter = 0;
 
 	if (counter == NULL)
 		counter = &dummy_counter;


More information about the varnish-commit mailing list