Commit 5a8ac36
committed
pythongh-140068: 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 8e0bf4f commit 5a8ac36
1 file changed
+5
-0
lines changed| 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