mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
[Bug #19901]
fix leak in module clone Co-authored-by: Peter Zhu <peter@peterzhu.ca>
This commit is contained in:
parent
61a2e9450c
commit
c42261059d
2 changed files with 13 additions and 0 deletions
1
class.c
1
class.c
|
@ -471,6 +471,7 @@ copy_tables(VALUE clone, VALUE orig)
|
|||
rb_id_table_foreach(rb_cvc_tbl, cvc_table_copy, &ctx);
|
||||
RCLASS_CVC_TBL(clone) = rb_cvc_tbl_dup;
|
||||
}
|
||||
rb_id_table_free(RCLASS_M_TBL(clone));
|
||||
RCLASS_M_TBL(clone) = 0;
|
||||
if (!RB_TYPE_P(clone, T_ICLASS)) {
|
||||
st_data_t id;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue