Skip to content

Commit b435079

Browse files
[3.13] gh-151126: Fix missing PyErr_NoMemory in testinternalcapi.c (GH-152177) (#152181)
gh-151126: Fix missing `PyErr_NoMemory` in `testinternalcapi.c` (GH-152177) (cherry picked from commit a009328) Co-authored-by: sobolevn <mail@sobolevn.me>
1 parent c5ac825 commit b435079

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)