[6.0] 555b329a5 Flexelinting

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Wed Jul 10 07:42:09 UTC 2019


commit 555b329a5f26e36aad12f72ecdef5d360d0fe18b
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Wed Jan 16 09:56:57 2019 +0000

    Flexelinting

diff --git a/lib/libvcc/vcc_vmod.c b/lib/libvcc/vcc_vmod.c
index 8b308c03f..00f0cb0d0 100644
--- a/lib/libvcc/vcc_vmod.c
+++ b/lib/libvcc/vcc_vmod.c
@@ -394,9 +394,11 @@ vcc_Act_New(struct vcc *tl, struct token *t, struct symbol *sym)
 	vf = VTAILQ_NEXT(vf, list);
 
 	buf = VSB_new_auto();
+	AN(buf);
 	VSB_printf(buf, ", &%s, \"%s\"", sy1->rname, sy1->name);
 	AZ(VSB_finish(buf));
 	vcc_Eval_Func(tl, vf, VSB_data(buf), sy2);
+	VSB_destroy(&buf);
 	ERRCHK(tl);
 	SkipToken(tl, ';');
 	sy1->def_e = tl->t;
@@ -413,7 +415,8 @@ vcc_Act_New(struct vcc *tl, struct token *t, struct symbol *sym)
 	VSB_printf(ifp->fin, "\t\t%s(&%s);", vf->value, sy1->rname);
 
 	/* Instantiate symbols for the methods */
-	VSB_clear(buf);
+	buf = VSB_new_auto();
+	AN(buf);
 	VSB_printf(buf, ", %s", sy1->rname);
 	AZ(VSB_finish(buf));
 	p = TlDup(tl, VSB_data(buf));


More information about the varnish-commit mailing list