From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Thu, 25 Jun 2026 10:19:35 +0000 (+0200) Subject: [3.14] gh-151126: Fix missing `PyErr_NoMemory` in `testinternalcapi.c` (GH-152177... X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab694a8137d92a5ddbccdbdb39b1a6cd64bb7b8a;p=thirdparty%2FPython%2Fcpython.git [3.14] gh-151126: Fix missing `PyErr_NoMemory` in `testinternalcapi.c` (GH-152177) (#152180) gh-151126: Fix missing `PyErr_NoMemory` in `testinternalcapi.c` (GH-152177) (cherry picked from commit a0093282ea87e112e3758e6b3eadb8b6b9770569) Co-authored-by: sobolevn --- diff --git a/Modules/_testinternalcapi.c b/Modules/_testinternalcapi.c index 158c26d442ed..6df5032205e6 100644 --- a/Modules/_testinternalcapi.c +++ b/Modules/_testinternalcapi.c @@ -1357,7 +1357,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(). */