[master] d1bd80e83 assert for VGZ_NewGzip() failures
Nils Goroll
nils.goroll at uplex.de
Wed Apr 1 08:10:07 UTC 2020
commit d1bd80e83a88a0caaaf7e5021472e23d244a8ac6
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Thu Mar 19 10:52:15 2020 +0100
assert for VGZ_NewGzip() failures
VGZ_NewGzip will either assert or succeed.
diff --git a/bin/varnishd/cache/cache_esi_fetch.c b/bin/varnishd/cache/cache_esi_fetch.c
index 4592d37cc..221822059 100644
--- a/bin/varnishd/cache/cache_esi_fetch.c
+++ b/bin/varnishd/cache/cache_esi_fetch.c
@@ -171,6 +171,7 @@ vfp_esi_gzip_init(struct vfp_ctx *vc, struct vfp_entry *vfe)
return (VFP_ERROR);
}
vef->vgz = VGZ_NewGzip(vc->wrk->vsl, "G F E");
+ AN(vef->vgz);
vef->ibuf_sz = cache_param->gzip_buffer;
vef->ibuf = calloc(1L, vef->ibuf_sz);
diff --git a/bin/varnishd/cache/cache_gzip.c b/bin/varnishd/cache/cache_gzip.c
index 27e6c9926..569ca1e56 100644
--- a/bin/varnishd/cache/cache_gzip.c
+++ b/bin/varnishd/cache/cache_gzip.c
@@ -503,8 +503,7 @@ vfp_gzip_init(struct vfp_ctx *vc, struct vfp_entry *vfe)
vc->obj_flags |= OF_GZIPED;
}
}
- if (vg == NULL)
- return (VFP_ERROR);
+ AN(vg);
vfe->priv1 = vg;
if (vgz_getmbuf(vg))
return (VFP_ERROR);
More information about the varnish-commit
mailing list