[master] a532e3942 For rollback, NULL additional pointers which could point to workspace

Nils Goroll nils.goroll at uplex.de
Tue Apr 14 09:10:07 UTC 2020


commit a532e39421bfb00aa86dd1371cdba8010c14946b
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Tue Apr 14 11:07:40 2020 +0200

    For rollback, NULL additional pointers which could point to workspace

diff --git a/bin/varnishd/cache/cache_fetch.c b/bin/varnishd/cache/cache_fetch.c
index 5eedaa706..2924a9448 100644
--- a/bin/varnishd/cache/cache_fetch.c
+++ b/bin/varnishd/cache/cache_fetch.c
@@ -110,6 +110,8 @@ void Bereq_Rollback(struct busyobj *bo)
 	VCL_TaskLeave(bo->privs);
 	VCL_TaskEnter(bo->privs);
 	HTTP_Clone(bo->bereq, bo->bereq0);
+	bo->filter_list = NULL;
+	bo->err_reason = NULL;
 	WS_Rollback(bo->bereq->ws, bo->ws_bo);
 	WS_Rollback(bo->ws, bo->ws_bo);
 }
diff --git a/bin/varnishd/cache/cache_req.c b/bin/varnishd/cache/cache_req.c
index d9ad87203..43cb3837b 100644
--- a/bin/varnishd/cache/cache_req.c
+++ b/bin/varnishd/cache/cache_req.c
@@ -198,6 +198,7 @@ Req_Rollback(struct req *req)
 	if (IS_TOPREQ(req))
 		VCL_TaskEnter(req->top->privs);
 	HTTP_Clone(req->http, req->http0);
+	req->filter_list = NULL;
 	if (WS_Overflowed(req->ws))
 		req->wrk->stats->ws_client_overflow++;
 	WS_Rollback(req->ws, req->ws_req);


More information about the varnish-commit mailing list