[master] 78836dc70 Flexelinting
Poul-Henning Kamp
phk at FreeBSD.org
Wed Jan 16 09:58:08 UTC 2019
commit 78836dc701f3104fb74c88baf2c1d03e8b930493
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