summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
Diffstat (limited to 'Objects')
-rw-r--r--Objects/dictobject.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Objects/dictobject.c b/Objects/dictobject.c
index 3243061..36c710e 100644
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -1443,6 +1443,9 @@ dict_repr(PyDictObject *mp)
Py_INCREF(value);
s = PyObject_Repr(key);
PyUnicode_Append(&s, colon);
+ if (s == NULL)
+ goto Done;
+
PyUnicode_AppendAndDel(&s, PyObject_Repr(value));
Py_DECREF(key);
Py_DECREF(value);