Commit 3ce7873f authored by Christian Heimes's avatar Christian Heimes

Issue #23998: PyImport_ReInitLock() now checks for lock allocation error

parent 1b4aa454
......@@ -263,6 +263,8 @@ Build
C API
-----
- Issue #23998: PyImport_ReInitLock() now checks for lock allocation error
- Issue #22079: PyType_Ready() now checks that statically allocated type has
no dynamically allocated bases.
......
......@@ -337,8 +337,12 @@ _PyImport_ReleaseLock(void)
void
_PyImport_ReInitLock(void)
{
if (import_lock != NULL)
if (import_lock != NULL) {
import_lock = PyThread_allocate_lock();
if (import_lock == NULL) {
Py_FatalError("PyImport_ReInitLock failed to create a new lock");
}
}
import_lock_thread = -1;
import_lock_level = 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment