diff options
author | Adam Hess <HParker@github.com> | 2023-09-25 23:03:04 +0000 |
---|---|---|
committer | Peter Zhu <peter@peterzhu.ca> | 2023-09-26 11:12:21 -0400 |
commit | ef59175a68c448fe334125824b477a9e1d5629bc (patch) | |
tree | 27f9cc3064ea5b9409ac34eee73f6890be31fb65 /iseq.c | |
parent | 3f511a1d093a85da4f224c0651f8cf922f02f501 (diff) |
fix iseq kwargs table and original_iseq leaks
[bug #19903]
Co-authored-by: Peter Zhu <peter@peterzhu.ca>
Diffstat (limited to 'iseq.c')
-rw-r--r-- | iseq.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -188,7 +188,11 @@ rb_iseq_free(const rb_iseq_t *iseq) ruby_xfree((void *)body->mark_bits.list); } + ruby_xfree(body->variable.original_iseq); + if (body->param.keyword != NULL) { + if (body->param.keyword->table != &body->local_table[body->param.keyword->bits_start - body->param.keyword->num]) + ruby_xfree((void *)body->param.keyword->table); ruby_xfree((void *)body->param.keyword->default_values); ruby_xfree((void *)body->param.keyword); } |