Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e901d1f

Browse files
committed
Issue #18408: Fix Py_ReprEnter(), handle PyList_Append() failure
1 parent 095d99f commit e901d1f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Objects/object.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1910,7 +1910,8 @@ Py_ReprEnter(PyObject *obj)
19101910
if (PyList_GET_ITEM(list, i) == obj)
19111911
return 1;
19121912
}
1913-
PyList_Append(list, obj);
1913+
if (PyList_Append(list, obj) < 0)
1914+
return -1;
19141915
return 0;
19151916
}
19161917

0 commit comments

Comments
 (0)