vcc_DestroyTokenList(struct tokenlist *tl, char *ret)
{
struct membit *mb;
+ struct source *sp;
int i;
while (!TAILQ_EMPTY(&tl->membits)) {
free(mb->ptr);
free(mb);
}
+ while (!TAILQ_EMPTY(&tl->sources)) {
+ sp = TAILQ_FIRST(&tl->sources);
+ TAILQ_REMOVE(&tl->sources, sp, list);
+ vcc_destroy_source(sp);
+ }
vsb_delete(tl->fh);
vsb_delete(tl->fc);
if (sp == NULL)
return (NULL);
r = vcc_CompileSource(sb, sp);
- vcc_destroy_source(sp);
return (r);
}
if (sp == NULL)
return (NULL);
r = vcc_CompileSource(sb, sp);
- vcc_destroy_source(sp);
return (r);
}
unsigned char u;
assert(tl->t->tok == CSTR);
- tl->t->dec = malloc((tl->t->e - tl->t->b) - 1);
+ tl->t->dec = TlAlloc(tl, (tl->t->e - tl->t->b) - 1);
assert(tl->t->dec != NULL);
q = tl->t->dec;
for (p = tl->t->b + 1; p < tl->t->e - 1; ) {