diff options
-rw-r--r-- | src/c8asm/main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/c8asm/main.c b/src/c8asm/main.c index c70aed5..b77c469 100644 --- a/src/c8asm/main.c +++ b/src/c8asm/main.c @@ -100,6 +100,11 @@ asmfile(int fd, const char *fn) baseptr = u8strfit(&sb)->p; assemble(stdout, ast = parsefile(toks = lexfile(u8strtou8(sb)))); + da_foreach (&ast, node) { + if (node->kind == D_INSTR && node->instr.kind == I_DB) + free(node->instr.buf); + } + free(toks.buf); free(ast.buf); u8strfree(sb); |