[master] 06575ef41 Add missing asserts

Poul-Henning Kamp phk at FreeBSD.org
Wed Aug 12 12:07:08 UTC 2020


commit 06575ef411805fba5988e92b78f533eac0593569
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Wed Aug 12 09:42:43 2020 +0000

    Add missing asserts

diff --git a/bin/varnishd/cache/cache_vcl.c b/bin/varnishd/cache/cache_vcl.c
index 0c8e221fb..6c7427eb6 100644
--- a/bin/varnishd/cache/cache_vcl.c
+++ b/bin/varnishd/cache/cache_vcl.c
@@ -536,6 +536,7 @@ vcl_print_refs(const struct vcl *vcl)
 
 	CHECK_OBJ_NOTNULL(vcl, VCL_MAGIC);
 	msg = VSB_new_auto();
+	AN(msg);
 
 	VSB_printf(msg, "VCL %s is waiting for:", vcl->loaded_name);
 	Lck_Lock(&vcl_mtx);
@@ -646,6 +647,7 @@ vcl_load(struct cli *cli,
 	AZ(vcl);
 
 	msg = VSB_new_auto();
+	AN(msg);
 	vcl = VCL_Open(fn, msg);
 	AZ(VSB_finish(msg));
 	if (vcl == NULL) {
diff --git a/bin/varnishd/mgt/mgt_param.c b/bin/varnishd/mgt/mgt_param.c
index 32b1501c2..df62c2859 100644
--- a/bin/varnishd/mgt/mgt_param.c
+++ b/bin/varnishd/mgt/mgt_param.c
@@ -251,6 +251,7 @@ mcf_param_show(struct cli *cli, const char * const *av, void *priv)
 	struct vsb *vsb;
 
 	vsb = VSB_new_auto();
+	AN(vsb);
 	(void)priv;
 
 	if (av[2] != NULL && !strcmp(av[2], "changed"))
@@ -373,7 +374,9 @@ mcf_param_show_json(struct cli *cli, const char * const *av, void *priv)
 	}
 
 	vsb = VSB_new_auto();
+	AN(vsb);
 	def = VSB_new_auto();
+	AN(def);
 
 	n = 0;
 	VCLI_JSON_begin(cli, 2, av);


More information about the varnish-commit mailing list