summaryrefslogtreecommitdiff
path: root/usr.bin/oasm/lex.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/oasm/lex.c')
-rw-r--r--usr.bin/oasm/lex.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/usr.bin/oasm/lex.c b/usr.bin/oasm/lex.c
index 194f09a..c2a7a1f 100644
--- a/usr.bin/oasm/lex.c
+++ b/usr.bin/oasm/lex.c
@@ -284,7 +284,6 @@ lex_tok(struct oasm_state *state, struct oasm_token *ttp)
if ((tok = token_arith(p)) != TT_UNKNOWN) {
ttp->type = tok;
ttp->raw = p;
- lex_try_free(p);
return 0;
}
@@ -293,7 +292,6 @@ lex_tok(struct oasm_state *state, struct oasm_token *ttp)
ttp->is_reg = 1;
ttp->type = tok;
ttp->raw = p;
- lex_try_free(p);
return 0;
}
@@ -301,10 +299,10 @@ lex_tok(struct oasm_state *state, struct oasm_token *ttp)
if ((tok = token_operand(p)) != TT_UNKNOWN) {
ttp->type = tok;
ttp->raw = p;
- lex_try_free(p);
return 0;
}
oasm_err("bad token \"%s\"\n", p);
+ lex_try_free(p);
return -1;
}