Commit caf88532 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp Committed by Pål Hermunn Johansen

Fix (insignificant) memory leak with mal-formed ESI directives.

Fixes #1912
parent 5a46b8c9
......@@ -851,6 +851,8 @@ VEP_Parse(struct vep_state *vep, const char *p, size_t l)
vep_mark_skip(vep, p);
vep->in_esi_tag = 0;
vep->state = VEP_NEXTTAG;
if (vep->attr_vsb)
VSB_destroy(&vep->attr_vsb);
}
/******************************************************
......@@ -885,6 +887,7 @@ VEP_Parse(struct vep_state *vep, const char *p, size_t l)
vep->state = VEP_TAGERROR;
}
} else if (vep->state == VEP_ATTRGETVAL) {
AZ(vep->attr_vsb);
vep->attr_vsb = VSB_new_auto();
vep->state = VEP_ATTRDELIM;
} else if (vep->state == VEP_ATTRDELIM) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment