Skip to content

Commit 6adce9a

Browse files
[3.13] gh-140301: Fix memory leak in subinterpreter PyConfig cleanup (GH-140303)
(cherry picked from commit a615fb4) Co-authored-by: Shamil <[email protected]> Co-authored-by: Kumar Aditya <[email protected]>
1 parent 2d29aa2 commit 6adce9a

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)