]> granicus.if.org Git - python/commitdiff
_PyImport_Fini(): Closed small memory leak when an embedded app calls
authorBarry Warsaw <barry@python.org>
Tue, 3 Oct 2000 16:02:05 +0000 (16:02 +0000)
committerBarry Warsaw <barry@python.org>
Tue, 3 Oct 2000 16:02:05 +0000 (16:02 +0000)
Py_Initialize()/Py_Finalize() in a loop.  _PyImport_Filetab needed to
be deallocated.  Partial closure of SF #110681, Jitterbug PR#398.

Python/import.c

index 9ecd38de978dbec227daa9e590b772a267f70dfc..8d06a53adf83288d46aeb06fdf30d70ed5f6c94a 100644 (file)
@@ -132,6 +132,8 @@ _PyImport_Fini(void)
 {
        Py_XDECREF(extensions);
        extensions = NULL;
+       PyMem_DEL(_PyImport_Filetab);
+       _PyImport_Filetab = NULL;
 }