Skip to content
Browse files

make VFP_Close() idempotent

required for #3009
  • Loading branch information...
nigoroll committed Oct 2, 2019
1 parent 0ba4d29 commit ecfd1eb02daa8d90c87d33c3866a79fea80691c3
Showing with 3 additions and 2 deletions.
  1. +3 −2 bin/varnishd/cache/cache_fetch_proc.c
@@ -118,13 +118,14 @@ VFP_Setup(struct vfp_ctx *vc, struct worker *wrk)
VFP_Close(struct vfp_ctx *vc)
struct vfp_entry *vfe;
struct vfp_entry *vfe, *tmp;

VTAILQ_FOREACH(vfe, &vc->vfp, list) {
VTAILQ_FOREACH_SAFE(vfe, &vc->vfp, list, tmp) {
if (vfe->vfp->fini != NULL)
vfe->vfp->fini(vc, vfe);
VSLb(vc->wrk->vsl, SLT_VfpAcct, "%s %ju %ju", vfe->vfp->name,
(uintmax_t)vfe->calls, (uintmax_t)vfe->bytes_out);
VTAILQ_REMOVE(&vc->vfp, vfe, list);

0 comments on commit ecfd1eb

Please sign in to comment.
You can’t perform that action at this time.