removed memory leak

This commit is contained in:
Fabrice Bellard 2023-12-27 17:20:10 +01:00
parent a47f40cde8
commit 399d916e66

View file

@ -24236,8 +24236,10 @@ static __exception int js_parse_postfix_expr(JSParseState *s, int parse_flags)
return -1;
}
name = JS_DupAtom(s->ctx, s->token.u.ident.atom);
if (next_token(s)) /* update line number before emitting code */
if (next_token(s)) { /* update line number before emitting code */
JS_FreeAtom(s->ctx, name);
return -1;
}
do_get_var:
emit_op(s, OP_scope_get_var);
emit_u32(s, name);