Fix memory leak in parser for incomplete tokens
[Bug #19835]
The parser does not free the tbl of the struct vtable when there are leftover lvtbl in the parser. This causes a memory leak.
tbl
struct vtable
lvtbl
The following script reproduces this issue:
10.times do 100_000.times do Ripper.parse("class Foo") end puts `ps -o rss= -p #{$$}` end
Fix memory leak in parser for incomplete tokens
[Bug #19835]
The parser does not free the
tblof thestruct vtablewhen there areleftover
lvtblin the parser. This causes a memory leak.The following script reproduces this issue: