[master] e4fa9f4e8 Remember to set the REQ_DONE state when we unset the bereq.body;

Poul-Henning Kamp phk at FreeBSD.org
Wed Jun 13 16:52:13 UTC 2018


commit e4fa9f4e82af70ca9539d86616141d05517d0968
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 32055736c..ea8ea5e6e 100644
--- a/bin/varnishd/cache/cache_vrt_var.c
+++ b/bin/varnishd/cache/cache_vrt_var.c
@@ -499,6 +499,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