Bugfix: check context manager deinit callback for NULL before calling it (#2222)
The deinit_cb should be allowed to be NULL. JerryScript-DCO-1.0-Signed-off-by: Martijn The martijn.the@intel.com
This commit is contained in:
committed by
László Langó
parent
ccc283289c
commit
26ee8f7137
@@ -215,7 +215,10 @@ jerry_cleanup (void)
|
||||
this_p = next_p)
|
||||
{
|
||||
next_p = this_p->next_p;
|
||||
this_p->manager_p->deinit_cb (JERRY_CONTEXT_DATA_HEADER_USER_DATA (this_p));
|
||||
if (this_p->manager_p->deinit_cb)
|
||||
{
|
||||
this_p->manager_p->deinit_cb (JERRY_CONTEXT_DATA_HEADER_USER_DATA (this_p));
|
||||
}
|
||||
jmem_heap_free_block (this_p, sizeof (jerry_context_data_header_t) + this_p->manager_p->bytes_needed);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user