Skip to content

Commit

Permalink
Free the IV table after estimation
Browse files Browse the repository at this point in the history
We need to make sure the name table is freed otherwise we have a memory
leak.
  • Loading branch information
tenderlove committed Nov 22, 2022
1 parent 003f8ea commit aedf682
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions iseq.c
Expand Up @@ -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;
}

Expand Down

0 comments on commit aedf682

Please sign in to comment.