summaryrefslogtreecommitdiff
path: root/quickjs.c
diff options
context:
space:
mode:
Diffstat (limited to 'quickjs.c')
-rw-r--r--quickjs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/quickjs.c b/quickjs.c
index 2bca946..ecd5f15 100644
--- a/quickjs.c
+++ b/quickjs.c
@@ -24146,6 +24146,7 @@ static int js_parse_destructuring_element(JSParseState *s, int tok, int is_arg,
emit_op(s, OP_scope_get_var);
emit_atom(s, var_name);
emit_u16(s, s->cur_func->scope_level);
+ JS_FreeAtom(s->ctx, var_name);
goto lvalue0;
} else {
opcode = OP_scope_get_var;
@@ -24247,6 +24248,7 @@ static int js_parse_destructuring_element(JSParseState *s, int tok, int is_arg,
emit_op(s, OP_scope_get_var);
emit_atom(s, var_name);
emit_u16(s, s->cur_func->scope_level);
+ JS_FreeAtom(s->ctx, var_name);
goto lvalue1;
} else {
/* no need to make a reference for let/const */
@@ -24445,6 +24447,7 @@ static int js_parse_destructuring_element(JSParseState *s, int tok, int is_arg,
emit_op(s, OP_scope_get_var);
emit_atom(s, var_name);
emit_u16(s, s->cur_func->scope_level);
+ JS_FreeAtom(s->ctx, var_name);
goto lvalue2;
} else {
/* no need to make a reference for let/const */