From aedf682bfad425149053f58c9115bc830da4efd1 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Tue, 22 Nov 2022 13:54:30 -0800 Subject: Free the IV table after estimation We need to make sure the name table is freed otherwise we have a memory leak. --- iseq.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'iseq.c') 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; } -- cgit v1.2.3