Skip to content

Commit fd6df66

Browse files
[3.13] pythongh-140301: Fix memory leak in subinterpreter PyConfig cleanup (pythonGH-140303) (python#140684)
[3.13] pythongh-140301: Fix memory leak in subinterpreter `PyConfig` cleanup (pythonGH-140303) (cherry picked from commit a615fb4) Co-authored-by: Kumar Aditya <[email protected]>
1 parent 2d29aa2 commit fd6df66

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix memory leak of ``PyConfig`` in subinterpreters.

Python/pystate.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -985,6 +985,8 @@ PyInterpreterState_Delete(PyInterpreterState *interp)
985985

986986
_PyObject_FiniState(interp);
987987

988+
PyConfig_Clear(&interp->config);
989+
988990
free_interpreter(interp);
989991
}
990992

0 commit comments

Comments
 (0)