[Backport 200 - Backport #8141][Assigned] backport r39856

Issue #8141 has been reported by nagachika (Tomoyuki C.).


Backport #8141: backport r39856
https://bugs.ruby-lang.org/issues/8141

Author: nagachika (Tomoyuki C.)
Status: Assigned
Priority: Normal
Assignee: nagachika (Tomoyuki C.)
Category:
Target version:

r39856 fixes a potential memory leak.