]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-151126: Fix missing `PyErr_NoMemory` in `testinternalcapi.c` (GH-152177...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 25 Jun 2026 10:19:26 +0000 (12:19 +0200)
committerGitHub <noreply@github.com>
Thu, 25 Jun 2026 10:19:26 +0000 (13:19 +0300)
gh-151126: Fix missing `PyErr_NoMemory` in `testinternalcapi.c` (GH-152177)
(cherry picked from commit a0093282ea87e112e3758e6b3eadb8b6b9770569)

Co-authored-by: sobolevn <mail@sobolevn.me>
Modules/_testinternalcapi.c

index f9984da3671c8e34da404068003fe181e3af45b0..c26785fe33fae038c7f17ca2c734c18094f105f5 100644 (file)
@@ -1156,7 +1156,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(). */