From 343e013419c1d385e89aae4cd9bdfccf55dbd73a Mon Sep 17 00:00:00 2001 From: sobolevn Date: Thu, 25 Jun 2026 12:20:34 +0300 Subject: [PATCH] gh-151126: Fix missing `PyErr_NoMemory` in `testinternalcapi.c` --- Modules/_testinternalcapi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/_testinternalcapi.c b/Modules/_testinternalcapi.c index d0d1f1f1bc8e53e..e3de9006d5a427f 100644 --- a/Modules/_testinternalcapi.c +++ b/Modules/_testinternalcapi.c @@ -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(). */