diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2021-10-11 09:22:29 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-11 09:22:29 (GMT) |
commit | 3a58d6062060f9fcc1f4f9c43358769305bafef8 (patch) | |
tree | b98c8df3685b7231a8e65204c52431de39214879 /Python/importdl.c | |
parent | aff69c34b04390488ff8a364894f9e0c25fc4435 (diff) | |
download | cpython-3a58d6062060f9fcc1f4f9c43358769305bafef8.zip cpython-3a58d6062060f9fcc1f4f9c43358769305bafef8.tar.gz cpython-3a58d6062060f9fcc1f4f9c43358769305bafef8.tar.bz2 |
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/importdl.c')
-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 |