[master] 7aeca4d63 Flexelint-polish

Nils Goroll nils.goroll at uplex.de
Tue Jan 2 16:49:12 UTC 2024


commit 7aeca4d632827e2db91bf63e67e4c61c9319d038
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Tue Jan 2 17:42:39 2024 +0100

    Flexelint-polish
    
    of 083505193a5065fab0359568816b5e733b69edc3

diff --git a/bin/varnishd/cache/cache_req_body.c b/bin/varnishd/cache/cache_req_body.c
index c3afeb853..51d45471e 100644
--- a/bin/varnishd/cache/cache_req_body.c
+++ b/bin/varnishd/cache/cache_req_body.c
@@ -143,8 +143,8 @@ vrb_pull(struct req *req, ssize_t maxsize, objiterate_f *func, void *priv)
 	if (func != NULL) {
 		HSH_DerefBoc(req->wrk, req->body_oc);
 		AZ(HSH_DerefObjCore(req->wrk, &req->body_oc, 0));
-		if (vfps == VFP_END && (flush & OBJ_ITER_END) == 0)
-			func(priv, flush | OBJ_ITER_END, NULL, 0);
+		if (vfps == VFP_END && r == 0 && (flush & OBJ_ITER_END) == 0)
+			r = func(priv, flush | OBJ_ITER_END, NULL, 0);
 		if (vfps != VFP_END) {
 			req->req_body_status = BS_ERROR;
 			if (r == 0)


More information about the varnish-commit mailing list