summaryrefslogtreecommitdiff
path: root/iseq.c
diff options
context:
space:
mode:
authorAaron Patterson <tenderlove@ruby-lang.org>2022-11-22 13:54:30 -0800
committerAaron Patterson <tenderlove@ruby-lang.org>2022-11-22 13:54:30 -0800
commitaedf682bfad425149053f58c9115bc830da4efd1 (patch)
treed378c42f413dafca25751993439a84c5086967cb /iseq.c
parent003f8ea80983d9a2c1d5352c448ad2991fb73ad7 (diff)
downloadruby-aedf682bfad425149053f58c9115bc830da4efd1.tar.gz
Free the IV table after estimation
We need to make sure the name table is freed otherwise we have a memory leak.
Diffstat (limited to 'iseq.c')
-rw-r--r--iseq.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/iseq.c b/iseq.c
index b366f03823..e20e1a608a 100644
--- a/iseq.c
+++ b/iseq.c
@@ -2526,6 +2526,8 @@ rb_estimate_iv_count(VALUE klass, const rb_iseq_t * initialize_iseq)
count += RCLASS_EXT(superclass)->max_iv_count;
}
+ rb_id_table_free(iv_names);
+
return count;
}