Add missing free on cc_entries

Looks like an oversight in b9007b6c54 and
7ec2359374.
This commit is contained in:
Takashi Kokubun 2020-02-26 00:37:35 -08:00
parent 33b78b89ac
commit 83705c42ce
No known key found for this signature in database
GPG Key ID: 6FFC433B12EE23DD
1 changed files with 3 additions and 0 deletions

View File

@ -427,6 +427,9 @@ free_unit(struct rb_mjit_unit *unit)
unit->iseq->body->jit_func = (mjit_func_t)NOT_COMPILED_JIT_ISEQ_FUNC;
unit->iseq->body->jit_unit = NULL;
}
if (unit->cc_entries) {
free(unit->cc_entries);
}
if (unit->handle && dlclose(unit->handle)) { // handle is NULL if it's in queue
mjit_warning("failed to close handle for u%d: %s", unit->id, dlerror());
}