Fix an undefined read during module cleanup after parse error (#3181)

JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
This commit is contained in:
Dániel Bátyai
2019-10-03 11:01:11 +02:00
committed by GitHub
parent 2180d979b7
commit cfaecc6698
6 changed files with 22 additions and 33 deletions
+2 -3
View File
@@ -2581,10 +2581,9 @@ parser_parse_source (const uint8_t *arg_list_p, /**< function argument list */
scanner_cleanup (&context);
#if ENABLED (JERRY_ES2015_MODULE_SYSTEM)
if (context.module_current_node_p != NULL
&& context.module_current_node_p->module_names_p != NULL)
if (context.module_current_node_p != NULL)
{
ecma_module_release_module_names (context.module_current_node_p->module_names_p);
ecma_module_release_module_nodes (context.module_current_node_p);
}
#endif