diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2021-10-11 08:57:27 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-11 08:57:27 (GMT) |
commit | 9883ca498d654a4792d530bd8d6d64fef4dc971c (patch) | |
tree | c1b0595297d34c822a5353e1516dd8ca8748c8bf | |
parent | 15188b115a2da815556053372c912a81a74be43b (diff) | |
download | cpython-9883ca498d654a4792d530bd8d6d64fef4dc971c.zip cpython-9883ca498d654a4792d530bd8d6d64fef4dc971c.tar.gz cpython-9883ca498d654a4792d530bd8d6d64fef4dc971c.tar.bz2 |
Fix a leak in _PyImport_LoadDynamicModuleWithSpec() after failing PySys_Audit() (GH-28862)
-rw-r--r-- | Python/importdl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/importdl.c b/Python/importdl.c index 1847eba..27ffc64 100644 --- a/Python/importdl.c +++ b/Python/importdl.c @@ -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 |