Fix double literal free. (#2535)
Fixes #2531. JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
committed by
Akos Kiss
parent
3afc4b0b85
commit
5060579b90
@@ -204,6 +204,8 @@ parser_compute_indicies (parser_context_t *context_p, /**< context */
|
||||
if (!(literal_p->status_flags & LEXER_FLAG_SOURCE_PTR))
|
||||
{
|
||||
jmem_heap_free_block ((void *) char_p, literal_p->prop.length);
|
||||
/* This literal should not be freed even if an error is encountered later. */
|
||||
literal_p->status_flags |= LEXER_FLAG_SOURCE_PTR;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user