aboutsummaryrefslogtreecommitdiff
path: root/tccasm.c
diff options
context:
space:
mode:
Diffstat (limited to 'tccasm.c')
-rw-r--r--tccasm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tccasm.c b/tccasm.c
index 3fa6f07..f67c1a6 100644
--- a/tccasm.c
+++ b/tccasm.c
@@ -292,7 +292,7 @@ static void asm_free_labels(TCCState *st)
{
Sym *s, *s1;
Section *sec;
-
+
for(s = st->asm_labels; s != NULL; s = s1) {
s1 = s->prev;
/* define symbol value in object file */
@@ -305,6 +305,9 @@ static void asm_free_labels(TCCState *st)
}
/* remove label */
table_ident[s->v - TOK_IDENT]->sym_label = NULL;
+ if (s->asm_label) {
+ tcc_free(s->asm_label);
+ }
sym_free(s);
}
st->asm_labels = NULL;