Commit 2d750ad
committed
Fix memory leaks: remove spurious GC_TRY_ADDREF on transferred arrays
dc_build_output transferred entry->props and entry->prop_mask into
the states array by setting e->props = NULL to prevent double-free.
But it also called GC_TRY_ADDREF which bumped the refcount to 2,
leaving 1 after the states dtor freed its reference — leaking the
HashTable. The arrays are moved, not shared, so no addref is needed.1 parent 09a26c2 commit 2d750ad
1 file changed
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1494 | 1494 | | |
1495 | 1495 | | |
1496 | 1496 | | |
| 1497 | + | |
1497 | 1498 | | |
1498 | 1499 | | |
1499 | 1500 | | |
1500 | 1501 | | |
1501 | 1502 | | |
1502 | 1503 | | |
1503 | | - | |
1504 | 1504 | | |
1505 | | - | |
1506 | 1505 | | |
1507 | 1506 | | |
1508 | 1507 | | |
| |||
1511 | 1510 | | |
1512 | 1511 | | |
1513 | 1512 | | |
1514 | | - | |
1515 | 1513 | | |
1516 | 1514 | | |
1517 | 1515 | | |
| |||
0 commit comments