gh-151126: Fix missing `PyErr_NoMemory` in `testinternalcapi.c` (#152… · python/cpython@a009328

GitHub

Original file line numberDiff line numberDiff line change@@ -1919,7 +1919,7 @@ pending_identify(PyObject *self, PyObject *args)

1919191919201920PyThread_type_lockmutex=PyThread_allocate_lock();

19211921if (mutex==NULL) {

1922-returnNULL;

1922+returnPyErr_NoMemory();

19231923 }

19241924PyThread_acquire_lock(mutex, WAIT_LOCK);

19251925/* It gets released in _pending_identify_callback(). */