diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2021-10-11 02:43:09 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-11 02:43:09 -0700 |
commit | d57d33c2342f8ebaf9a91fe991dbfc148340e811 (patch) | |
tree | 0bbd32d2075d60d1335b44c6259c1ae2b9c0f81f /Python | |
parent | 5f44bb28fd9e98d681adff7e3329d6a863d3d5cd (diff) | |
download | cpython-git-d57d33c2342f8ebaf9a91fe991dbfc148340e811.tar.gz |
Fix a leak in _PyImport_LoadDynamicModuleWithSpec() after failing PySys_Audit() (GH-28862)
(cherry picked from commit 9883ca498d654a4792d530bd8d6d64fef4dc971c)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Diffstat (limited to 'Python')
-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 fbeb9fb754..b197dfeaef 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 |