]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-151126: Fix missing `PyErr_NoMemory` in `testinternalcapi.c` (#152177)
authorsobolevn <mail@sobolevn.me>
Thu, 25 Jun 2026 09:48:23 +0000 (12:48 +0300)
committerGitHub <noreply@github.com>
Thu, 25 Jun 2026 09:48:23 +0000 (09:48 +0000)
Modules/_testinternalcapi.c

index d0d1f1f1bc8e53e804bea402cd71c07c79150bc4..e3de9006d5a427f31d1e947775e5559108e97e64 100644 (file)
@@ -1919,7 +1919,7 @@ pending_identify(PyObject *self, PyObject *args)
 
     PyThread_type_lock mutex = PyThread_allocate_lock();
     if (mutex == NULL) {
-        return NULL;
+        return PyErr_NoMemory();
     }
     PyThread_acquire_lock(mutex, WAIT_LOCK);
     /* It gets released in _pending_identify_callback(). */