diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2013-07-17 19:58:41 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2013-07-17 19:58:41 (GMT) |
commit | e901d1fbdff989c3d4b47eb46b0eb1ae6e46b71c (patch) | |
tree | 9fb5e882eb5c960a1d4d4996145fa4a12d3e722f /Objects | |
parent | 095d99ffffbcee6d33523c439dc6a81a6787c5b6 (diff) | |
download | cpython-e901d1fbdff989c3d4b47eb46b0eb1ae6e46b71c.zip cpython-e901d1fbdff989c3d4b47eb46b0eb1ae6e46b71c.tar.gz cpython-e901d1fbdff989c3d4b47eb46b0eb1ae6e46b71c.tar.bz2 |
Issue #18408: Fix Py_ReprEnter(), handle PyList_Append() failure
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/object.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Objects/object.c b/Objects/object.c index 700e8be..e957d9d 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -1910,7 +1910,8 @@ Py_ReprEnter(PyObject *obj) if (PyList_GET_ITEM(list, i) == obj) return 1; } - PyList_Append(list, obj); + if (PyList_Append(list, obj) < 0) + return -1; return 0; } |