assert magic of vrt_privs when finalizing

Originally suggested by @rezan in
https://github.com/varnishcache/varnish-cache/pull/3408/commits/4caad2c1858afb399f75230916183d31f57fc908
parent c1244982
......@@ -238,7 +238,9 @@ VCL_TaskLeave(struct vrt_privs *privs)
* a costly operation. Instead we safely walk the whole tree and clear
* the head at the very end.
*/
VRBT_FOREACH_SAFE(vp, vrt_privs, privs, vp1)
VRBT_FOREACH_SAFE(vp, vrt_privs, privs, vp1) {
CHECK_OBJ(vp, VRT_PRIV_MAGIC);
VRT_priv_fini(vp->priv);
}
ZERO_OBJ(privs, sizeof *privs);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment