Skip to content

Commit 459785b

Browse files
ashm-devkumaraditya303
authored andcommitted
pythongh-140301: Fix memory leak in subinterpreter PyConfig cleanup (python#140303)
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
1 parent c1ed804 commit 459785b

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
@@ -963,6 +963,8 @@ PyInterpreterState_Delete(PyInterpreterState *interp)
963963

964964
_PyObject_FiniState(interp);
965965

966+
PyConfig_Clear(&interp->config);
967+
966968
free_interpreter(interp);
967969
}
968970

0 commit comments

Comments
 (0)