Commit c341399
committed
Fix memory leak in pm_parse_process
pm_parse_process initializes the index_lookup_table but nothing seems to
use it after it has been allocated. However, pm_compile_scope_node will
overwrite the index_lookup_table and cause it to leak memory. This can
be seen during bootup with the following memory leaks reported by ASAN:
#0 0x60dba31b7af3 in malloc
#1 0x60dba32e0718 in rb_gc_impl_malloc gc/default/default.c:8287:5
#2 0x60dba32c7aa7 in ruby_xmalloc_body gc.c:5373:12
#3 0x60dba32c4a54 in ruby_xmalloc gc.c:5355:34
#4 0x60dba3260314 in pm_index_lookup_table_init_heap prism_compile.h:89:29
#5 0x60dba3209388 in pm_parse_process prism_compile.c:11366:51 parent 77b803c commit c341399
1 file changed
Lines changed: 0 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11362 | 11362 | | |
11363 | 11363 | | |
11364 | 11364 | | |
11365 | | - | |
11366 | | - | |
11367 | | - | |
11368 | | - | |
11369 | | - | |
11370 | | - | |
11371 | 11365 | | |
11372 | 11366 | | |
11373 | 11367 | | |
| |||
0 commit comments