Skip to content

Commit b08733f

Browse files
sobolevnmiss-islington
authored andcommitted
gh-151126: Fix missing PyErr_NoMemory in testinternalcapi.c (GH-152177)
(cherry picked from commit a009328) Co-authored-by: sobolevn <[email protected]>
1 parent c5ac825 commit b08733f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎Modules/_testinternalcapi.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1156,7 +1156,7 @@ pending_identify(PyObject *self, PyObject *args)
11561156

11571157
PyThread_type_lock mutex = PyThread_allocate_lock();
11581158
if (mutex == NULL) {
1159-
return NULL;
1159+
return PyErr_NoMemory();
11601160
}
11611161
PyThread_acquire_lock(mutex, WAIT_LOCK);
11621162
/* It gets released in _pending_identify_callback(). */

0 commit comments

Comments
 (0)