From: Victor Stinner Date: Wed, 17 Jul 2013 19:58:41 +0000 (+0200) Subject: Issue #18408: Fix Py_ReprEnter(), handle PyList_Append() failure X-Git-Tag: v3.4.0a1~163 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e901d1fbdff989c3d4b47eb46b0eb1ae6e46b71c;p=python Issue #18408: Fix Py_ReprEnter(), handle PyList_Append() failure --- diff --git a/Objects/object.c b/Objects/object.c index 700e8bef56..e957d9d7b0 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; }