]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix a leak in _PyImport_LoadDynamicModuleWithSpec() after failing PySys_Audit() ...
authorSerhiy Storchaka <storchaka@gmail.com>
Mon, 11 Oct 2021 08:57:27 +0000 (11:57 +0300)
committerGitHub <noreply@github.com>
Mon, 11 Oct 2021 08:57:27 +0000 (11:57 +0300)
Python/importdl.c

index 1847eba74aef45ce241bd13b2b262e45898fc9c3..27ffc64284098e6e8e2435a842264a9be202587a 100644 (file)
@@ -121,7 +121,7 @@ _PyImport_LoadDynamicModuleWithSpec(PyObject *spec, FILE *fp)
 
     if (PySys_Audit("import", "OOOOO", name_unicode, path,
                     Py_None, Py_None, Py_None) < 0) {
-        return NULL;
+        goto error;
     }
 
 #ifdef MS_WINDOWS