Commit 6972c55b authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

Clarify priv_task tear-down

Someone should triple-check that it is indeed safe.
parent 9f768696
......@@ -206,8 +206,11 @@ VCL_TaskLeave(const struct vcl *vcl, struct vrt_privs *privs)
AN(vcl);
CHECK_OBJ_NOTNULL(privs, VRT_PRIVS_MAGIC);
VRBT_FOREACH_SAFE(vp, vrt_priv_tree, &privs->privs, vp1) {
/* NB: We don't bother removing entries as we finish them because it's
* a costly operation. Instead we safely walk the whole tree and clear
* the head at the very end.
*/
VRBT_FOREACH_SAFE(vp, vrt_priv_tree, &privs->privs, vp1)
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