Commit 47cfd6a
Fix 4 reference leaks in make_inline_cache_stats
Summary:
PyUnicode_InternFromString and PyLong_FromLong return new references,
but PyDict_SetItemString does not steal them. The new references were
passed directly and never decref'd, leaking per cache entry. Wrap
each in Ref<>::steal to ensure proper cleanup, matching the pattern
already used for other allocations in the same function.
Reviewed By: jbower-fb
Differential Revision: D94681805
fbshipit-source-id: 2340ab6ccdfdfad913b96b83de4922311af719801 parent 9fc398c commit 47cfd6a
1 file changed
Lines changed: 11 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2400 | 2400 | | |
2401 | 2401 | | |
2402 | 2402 | | |
2403 | | - | |
2404 | | - | |
2405 | | - | |
2406 | | - | |
2407 | | - | |
2408 | | - | |
2409 | | - | |
2410 | | - | |
| 2403 | + | |
| 2404 | + | |
| 2405 | + | |
| 2406 | + | |
| 2407 | + | |
| 2408 | + | |
2411 | 2409 | | |
2412 | 2410 | | |
2413 | 2411 | | |
2414 | 2412 | | |
2415 | 2413 | | |
2416 | | - | |
2417 | | - | |
2418 | | - | |
2419 | | - | |
2420 | | - | |
2421 | | - | |
2422 | | - | |
| 2414 | + | |
| 2415 | + | |
| 2416 | + | |
| 2417 | + | |
| 2418 | + | |
2423 | 2419 | | |
2424 | 2420 | | |
2425 | 2421 | | |
| |||
0 commit comments