Permalink
Browse files

Guard all the VDP_Push calls

Two of them have no init step, and the third one is fail-safe.
  • Loading branch information...
Dridi committed Feb 8, 2019
1 parent b588404 commit 832d6da2d732636b42a78920980a84b3e33bda9b
Showing with 3 additions and 3 deletions.
  1. +3 −3 bin/varnishd/cache/cache_esi_deliver.c
@@ -833,14 +833,14 @@ ved_deliver(struct req *req, struct boc *boc, int wantbody)

INIT_OBJ(foo, VED_FOO_MAGIC);
foo->ecx = ecx;
(void)VDP_Push(req, &ved_gzgz, foo);
AZ(VDP_Push(req, &ved_gzgz, foo));

} else if (ecx->isgzip && !i) {
/* Non-Gzip'ed include in gzip'ed parent */
(void)VDP_Push(req, &ved_pretend_gz, ecx);
AZ(VDP_Push(req, &ved_pretend_gz, ecx));
} else {
/* Anything else goes straight through */
(void)VDP_Push(req, &ved_ved, ecx);
AZ(VDP_Push(req, &ved_ved, ecx));
}
(void)VDP_DeliverObj(req);
(void)VDP_bytes(req, VDP_FLUSH, NULL, 0);

0 comments on commit 832d6da

Please sign in to comment.