[6.0] 4c2f0d9b9 Remember to set the REQ_DONE state when we unset the bereq.body;

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Thu Aug 16 08:53:12 UTC 2018


commit 4c2f0d9b9008aca9aea7eb7d3c80fc7b51066b6c
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Wed Jun 13 16:50:55 2018 +0000

    Remember to set the REQ_DONE state when we unset the bereq.body;
    
    Found by:       fgs & ASAN

diff --git a/bin/varnishd/cache/cache_vrt_var.c b/bin/varnishd/cache/cache_vrt_var.c
index 76b4c89f9..c06dde561 100644
--- a/bin/varnishd/cache/cache_vrt_var.c
+++ b/bin/varnishd/cache/cache_vrt_var.c
@@ -500,6 +500,8 @@ VRT_u_bereq_body(VRT_CTX)
 	if (ctx->bo->req != NULL) {
 		CHECK_OBJ_NOTNULL(ctx->bo->req, REQ_MAGIC);
 		ctx->bo->req = NULL;
+		ObjSetState(ctx->bo->wrk,
+		    ctx->bo->fetch_objcore, BOS_REQ_DONE);
 		http_Unset(ctx->bo->bereq, H_Content_Length);
 	}
 }


More information about the varnish-commit mailing list