summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornagachika <nagachika@ruby-lang.org>2023-09-30 13:48:45 +0900
committernagachika <nagachika@ruby-lang.org>2023-09-30 13:48:45 +0900
commit128d8728d39c2da21e5433c7af169f73e18fd133 (patch)
treee3d0705a8316d258a41d46d24ee74691e62a9c85
parenta191cf561786bde3d0b7d298aab1fbeb1051645c (diff)
merge revision(s) ef59175a68c448fe334125824b477a9e1d5629bc: [Backport #19903]
fix iseq kwargs table and original_iseq leaks [bug #19903] Co-authored-by: Peter Zhu <peter@peterzhu.ca> --- iseq.c | 4 ++++ 1 file changed, 4 insertions(+)
-rw-r--r--iseq.c4
-rw-r--r--version.h2
2 files changed, 5 insertions, 1 deletions
diff --git a/iseq.c b/iseq.c
index a6ba5c12bb..16625a6f0e 100644
--- a/iseq.c
+++ b/iseq.c
@@ -187,7 +187,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);
}
diff --git a/version.h b/version.h
index 59923d31a9..c4670eb29c 100644
--- a/version.h
+++ b/version.h
@@ -11,7 +11,7 @@
# define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR
#define RUBY_VERSION_TEENY 2
#define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR
-#define RUBY_PATCHLEVEL 123
+#define RUBY_PATCHLEVEL 124
#include "ruby/version.h"
#include "ruby/internal/abi.h"