[4.1] 66273bb Spring some AN() love

Lasse Karstensen lkarsten at varnish-software.com
Thu Jan 14 15:15:10 CET 2016


commit 66273bb38e68eb11b4f4bd99c450f1f1c6958095
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date:   Tue Jan 5 10:42:02 2016 +0000

    Spring some AN() love

diff --git a/bin/varnishncsa/varnishncsa.c b/bin/varnishncsa/varnishncsa.c
index dfb4885..249efee 100644
--- a/bin/varnishncsa/varnishncsa.c
+++ b/bin/varnishncsa/varnishncsa.c
@@ -531,6 +531,7 @@ addf_auth(const char *str)
 	struct format *f;
 
 	ALLOC_OBJ(f, FORMAT_MAGIC);
+	AN(f);
 	f->func = &format_auth;
 	if (str != NULL) {
 		f->string = strdup(str);
diff --git a/lib/libvarnishapi/vsc.c b/lib/libvarnishapi/vsc.c
index c86852d..f051cea 100644
--- a/lib/libvarnishapi/vsc.c
+++ b/lib/libvarnishapi/vsc.c
@@ -105,6 +105,7 @@ vsc_setup(struct VSM_data *vd)
 	CHECK_OBJ_NOTNULL(vd, VSM_MAGIC);
 	if (vd->vsc == NULL) {
 		ALLOC_OBJ(vd->vsc, VSC_MAGIC);
+		AN(vd->vsc);
 		VTAILQ_INIT(&vd->vsc->vf_list);
 		VTAILQ_INIT(&vd->vsc->pt_list);
 		VTAILQ_INIT(&vd->vsc->sf_list);



More information about the varnish-commit mailing list