summaryrefslogtreecommitdiff
path: root/mjit_worker.c
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2020-02-26 00:37:35 -0800
committerTakashi Kokubun <takashikkbn@gmail.com>2020-02-26 00:37:37 -0800
commit83705c42cedd9489596859827d7201c59feccebd (patch)
treef7a553ffbd99d9a39741108cebeae2513882a386 /mjit_worker.c
parent33b78b89ac1901fe9000d03bcb3cdf79193a75a1 (diff)
Add missing free on cc_entries
Looks like an oversight in b9007b6c548f91e88fd3f2ffa23de740431fa969 and 7ec23593746c8ccabd6c005cc34dde77d564c6c9.
Diffstat (limited to 'mjit_worker.c')
-rw-r--r--mjit_worker.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mjit_worker.c b/mjit_worker.c
index 09f07d8..ec9d27c 100644
--- a/mjit_worker.c
+++ b/mjit_worker.c
@@ -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());
}