Skip to content

Commit 93ff7c3

Browse files
[3.15] gh-151126: Fix missing PyErr_NoMemory in testinternalcapi.c (GH-152177) (#152179)
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 cf8051b commit 93ff7c3

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
@@ -1912,7 +1912,7 @@ pending_identify(PyObject *self, PyObject *args)
19121912

19131913
PyThread_type_lock mutex = PyThread_allocate_lock();
19141914
if (mutex == NULL) {
1915-
return NULL;
1915+
return PyErr_NoMemory();
19161916
}
19171917
PyThread_acquire_lock(mutex, WAIT_LOCK);
19181918
/* It gets released in _pending_identify_callback(). */

0 commit comments

Comments
 (0)