[6.0] d7c55ba79 Ensure VRT_priv_task doesn't get both req and bo

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Wed Oct 31 13:08:08 UTC 2018


commit d7c55ba79410af65ee4b71b1017528f362ec0fc0
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Mon Aug 27 20:19:06 2018 +0200

    Ensure VRT_priv_task doesn't get both req and bo

diff --git a/bin/varnishd/cache/cache_vrt_priv.c b/bin/varnishd/cache/cache_vrt_priv.c
index 8d83f176c..09c18c54f 100644
--- a/bin/varnishd/cache/cache_vrt_priv.c
+++ b/bin/varnishd/cache/cache_vrt_priv.c
@@ -141,6 +141,7 @@ VRT_priv_task(VRT_CTX, const void *vmod_id)
 	struct vrt_privs *vps;
 
 	CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
+	assert(ctx->req == NULL || ctx->bo == NULL);
 	if (ctx->req) {
 		CHECK_OBJ_NOTNULL(ctx->req, REQ_MAGIC);
 		id = (uintptr_t)ctx->req;


More information about the varnish-commit mailing list