Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8429448

Browse files
committed
_PyImport_Fini(): Closed small memory leak when an embedded app calls
Py_Initialize()/Py_Finalize() in a loop. _PyImport_Filetab needed to be deallocated. Partial closure of SF #110681, Jitterbug PR#398.
1 parent e35360f commit 8429448

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Python/import.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ _PyImport_Fini(void)
132132
{
133133
Py_XDECREF(extensions);
134134
extensions = NULL;
135+
PyMem_DEL(_PyImport_Filetab);
136+
_PyImport_Filetab = NULL;
135137
}
136138

137139

0 commit comments

Comments
 (0)