]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-150374: Fix double release of import lock in lazy import reification (#150376)
authorpengyu lee <lipengyu@kylinos.cn>
Mon, 25 May 2026 09:09:38 +0000 (17:09 +0800)
committerGitHub <noreply@github.com>
Mon, 25 May 2026 09:09:38 +0000 (09:09 +0000)
Misc/NEWS.d/next/Core_and_Builtins/2026-05-25-16-00-22.gh-issue-150374.Emu6d8.rst [new file with mode: 0644]
Python/import.c

diff --git a/Misc/NEWS.d/next/Core_and_Builtins/2026-05-25-16-00-22.gh-issue-150374.Emu6d8.rst b/Misc/NEWS.d/next/Core_and_Builtins/2026-05-25-16-00-22.gh-issue-150374.Emu6d8.rst
new file mode 100644 (file)
index 0000000..7189ca1
--- /dev/null
@@ -0,0 +1 @@
+Fix double release of the import lock on lazy import reification errors.
index 91164bc8043b226178c8ee6fcf833ab26a2f00dc..3e470d2c22cfbd789253767f6f202955a9856907 100644 (file)
@@ -3928,7 +3928,6 @@ _PyImport_LoadLazyImportTstate(PyThreadState *tstate, PyObject *lazy_import)
         return NULL;
     }
     else if (PySet_Add(importing, lazy_import) < 0) {
-        _PyImport_ReleaseLock(interp);
         goto error;
     }