(original) (raw)

changeset: 84696:2f5f1db8eb88 user: Victor Stinner victor.stinner@gmail.com date: Wed Jul 17 21:58:41 2013 +0200 files: Objects/object.c description: Issue #18408: Fix Py_ReprEnter(), handle PyList_Append() failure diff -r 97bb3bdf1443 -r 2f5f1db8eb88 Objects/object.c --- a/Objects/object.c Wed Jul 17 21:58:01 2013 +0200 +++ b/Objects/object.c Wed Jul 17 21:58:41 2013 +0200 @@ -1910,7 +1910,8 @@ if (PyList_GET_ITEM(list, i) == obj) return 1; } - PyList_Append(list, obj); + if (PyList_Append(list, obj) < 0) + return -1; return 0; } /victor.stinner@gmail.com