[master] 96e81ce2e Plug minor leak and cleanup
Federico G. Schwindt
fgsch at lodoss.net
Thu Jun 13 17:34:08 UTC 2019
commit 96e81ce2e2248e4e1c5918544f425e75b36fda40
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date: Thu Jun 13 18:20:16 2019 +0100
Plug minor leak and cleanup
diff --git a/lib/libvarnishapi/vut.c b/lib/libvarnishapi/vut.c
index fe4f22cc7..5c9d6a509 100644
--- a/lib/libvarnishapi/vut.c
+++ b/lib/libvarnishapi/vut.c
@@ -132,7 +132,6 @@ static void
vut_arg_q(struct VUT *vut, const char *arg)
{
struct vsb *vsb;
- char *s;
AN(arg);
if (vut->q_arg == NULL) {
@@ -145,10 +144,8 @@ vut_arg_q(struct VUT *vut, const char *arg)
AZ(VSB_printf(vsb, "%s\n%s", vut->q_arg, arg));
AZ(VSB_finish(vsb));
- s = strdup(VSB_data(vsb));
- REPLACE(vut->q_arg, s);
+ REPLACE(vut->q_arg, VSB_data(vsb));
- VSB_clear(vsb);
VSB_destroy(&vsb);
}
More information about the varnish-commit
mailing list