[master] 6ec734a Try to close one of the leaks reported in #1860
Poul-Henning Kamp
phk at FreeBSD.org
Fri Feb 26 09:46:48 CET 2016
commit 6ec734af32e13f13e22764b056314328873a8062
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Fri Feb 26 08:46:25 2016 +0000
Try to close one of the leaks reported in #1860
diff --git a/bin/varnishd/cache/cache_esi_parse.c b/bin/varnishd/cache/cache_esi_parse.c
index aa62545..dcfa96c 100644
--- a/bin/varnishd/cache/cache_esi_parse.c
+++ b/bin/varnishd/cache/cache_esi_parse.c
@@ -448,11 +448,10 @@ vep_do_include(struct vep_state *vep, enum dowhat what)
vep->state = VEP_TAGERROR;
VSB_destroy(&vep->attr_vsb);
VSB_destroy(&vep->include_src);
- vep->attr_vsb = NULL;
- vep->include_src = NULL;
return;
}
vep->include_src = vep->attr_vsb;
+ vep->attr_vsb = NULL;
return;
}
assert(what == DO_TAG);
@@ -490,8 +489,8 @@ vep_do_include(struct vep_state *vep, enum dowhat what)
vep_warn(vep,
"ESI 1.0 <esi:include> with https:// ignored");
vep->state = VEP_TAGERROR;
- vep->attr_vsb = NULL;
- vep->include_src = NULL;
+ AZ(vep->attr_vsb);
+ VSB_destroy(&vep->include_src);
return;
}
vep_warn(vep,
@@ -1048,6 +1047,8 @@ VEP_Finish(struct vep_state *vep)
CHECK_OBJ_NOTNULL(vep, VEP_MAGIC);
+ AZ(vep->include_src);
+ AZ(vep->attr_vsb);
if (vep->o_pending)
vep_mark_common(vep, vep->ver_p, vep->last_mark);
if (vep->o_wait > 0) {
More information about the varnish-commit
mailing list