Skip to content

Commit bcfcfed

Browse files
committed
Fix memory leak in invalidate_ccs_in_iclass_cc_tbl
invalidate_ccs_in_iclass_cc_tbl deletes the ccs from the table but never frees it, causing memory to leak.
1 parent 14e7543 commit bcfcfed

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

vm_method.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,7 @@ invalidate_ccs_in_iclass_cc_tbl(VALUE value, void *data)
563563
{
564564
struct rb_class_cc_entries *ccs = (struct rb_class_cc_entries *)value;
565565
vm_cme_invalidate((rb_callable_method_entry_t *)ccs->cme);
566+
xfree(ccs);
566567
return ID_TABLE_DELETE;
567568
}
568569

0 commit comments

Comments
 (0)