(bc_align_destroy): Free boundary and maxskip (closing memory leaks).
* gas-bison.y (gas_get_section): Don't strdup name, it's always passed
in already strdup'ed/allocated (closes memory leak).
svn path=/trunk/yasm/; revision=1403
bc_align_destroy(void *contents)
{
bytecode_align *align = (bytecode_align *)contents;
+ if (align->boundary)
+ yasm_expr_destroy(align->boundary);
if (align->fill)
yasm_expr_destroy(align->fill);
+ if (align->maxskip)
+ yasm_expr_destroy(align->maxskip);
yasm_xfree(contents);
}
if (bc->callback)
bc->callback->destroy(bc->contents);
yasm_expr_destroy(bc->multiple);
- yasm_xfree(bc->symrecs);
+ if (bc->symrecs)
+ yasm_xfree(bc->symrecs);
yasm_xfree(bc);
}
yasm_section *new_section;
yasm_vps_initialize(&vps);
- vp = yasm_vp_create(yasm__xstrdup(name), NULL);
+ vp = yasm_vp_create(name, NULL);
yasm_vps_append(&vps, vp);
if (!builtin) {