Skip to content

Commit fc2a2f9

Browse files
rerobikadbatyai
authored andcommitted
Properly release scanner info in parser_parse_for_statement_start (#3211)
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik [email protected]
1 parent 9e323cd commit fc2a2f9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

jerry-core/parser/js/js-parser-statm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1066,7 +1066,7 @@ parser_parse_for_statement_start (parser_context_t *context_p) /**< context */
10661066
{
10671067
/* Even though the scanning is failed, there might be valid statements
10681068
* inside the for statement which depend on scanner info blocks. */
1069-
scanner_release_next (context_p, sizeof (parser_for_statement_t));
1069+
scanner_release_next (context_p, sizeof (scanner_for_info_t));
10701070
}
10711071

10721072
/* The prescanner couldn't find the second semicolon or the closing paranthesis. */
@@ -1097,7 +1097,7 @@ parser_parse_for_statement_start (parser_context_t *context_p) /**< context */
10971097
for_statement.expression_location = for_info_p->expression_location;
10981098

10991099
scanner_set_location (context_p, &for_info_p->end_location);
1100-
scanner_release_next (context_p, sizeof (parser_for_statement_t));
1100+
scanner_release_next (context_p, sizeof (scanner_for_info_t));
11011101
scanner_seek (context_p);
11021102
lexer_next_token (context_p);
11031103

0 commit comments

Comments
 (0)