Commit 8dd10cd
committed
gh-140067: Fix memory leak in subinterpreter creation
The memcpy() call in _PyInterpreterState_New() was overwriting the
_malloced pointer that was set by alloc_interpreter(), causing a memory
leak when subinterpreters were destroyed.
Fixed by preserving the _malloced pointer across the memcpy().1 parent 6416e6e commit 8dd10cd
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
662 | 662 | | |
663 | 663 | | |
664 | 664 | | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
665 | 668 | | |
666 | 669 | | |
667 | 670 | | |
| 671 | + | |
| 672 | + | |
668 | 673 | | |
669 | 674 | | |
670 | 675 | | |
| |||
0 commit comments