diff options
| author | Peter Zhu <peter@peterzhu.ca> | 2025-09-02 15:24:13 +0200 |
|---|---|---|
| committer | Peter Zhu <peter@peterzhu.ca> | 2025-09-09 11:29:35 +0200 |
| commit | ce94add7fbef17cbfa10de6a5554455542e1081c (patch) | |
| tree | b1f0064b0a51efa6fdc1b73f009449d3e88b40e2 /string.c | |
| parent | 5c98b899e6c1757e621b18d53a84c140109b7699 (diff) | |
Fix global variable counter for alias
If we alias two variable multiple times, for example like this:
alias $foo $bar
alias $foo $bar
Then we will increment the counter for entry2->var->counter each time,
which is not correct because we are not adding more references to
entry2->var. This reports as a memory leak in RUBY_FREE_AT_EXIT because
entry2->var->counter will never reach 0 and thus will never be freed.
Diffstat (limited to 'string.c')
0 files changed, 0 insertions, 0 deletions
