summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2013-07-17 19:58:41 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2013-07-17 19:58:41 (GMT)
commite901d1fbdff989c3d4b47eb46b0eb1ae6e46b71c (patch)
tree9fb5e882eb5c960a1d4d4996145fa4a12d3e722f /Objects
parent095d99ffffbcee6d33523c439dc6a81a6787c5b6 (diff)
downloadcpython-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.c3
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;
}