summaryrefslogtreecommitdiff
path: root/include/ruby/encoding.h
diff options
context:
space:
mode:
authorPeter Zhu <peter@peterzhu.ca>2023-09-19 20:48:41 -0400
committerPeter Zhu <peter@peterzhu.ca>2023-09-20 10:19:24 -0400
commit96c5a4be7b0d72502001734770af0f4a735c544c (patch)
tree77ced0cc55236787ecf8fee4916936da55e54944 /include/ruby/encoding.h
parent3c11cdbcfe5ebcf430b0cdfefb0b92724eebe543 (diff)
Fix memory leak in complemented method entries
[Bug #19894] When a copy of a complemented method entry is created, there are two issues: 1. IMEMO_FL_USER3 is not copied, so the complemented status is not copied over. 2. In rb_method_entry_clone we increment both alias_count and complemented_count. However, when we free the method entry in rb_method_definition_release, we only decrement one of the two counters, resulting in the rb_method_definition_t being leaked. Co-authored-by: Adam Hess <adamhess1991@gmail.com>
Diffstat (limited to 'include/ruby/encoding.h')
0 files changed, 0 insertions, 0 deletions