diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_operator.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/_operator.c b/Modules/_operator.c index 9e4db58..735affc 100644 --- a/Modules/_operator.c +++ b/Modules/_operator.c @@ -825,8 +825,10 @@ attrgetter_repr(attrgetterobject *ag) if (ag->nattrs == 1) { PyObject *attrsep = NULL; PyObject *attr = dotjoinattr(PyTuple_GET_ITEM(ag->attr, 0), &attrsep); - if (attr != NULL) + if (attr != NULL) { repr = PyUnicode_FromFormat("%s(%R)", Py_TYPE(ag)->tp_name, attr); + Py_DECREF(attr); + } Py_XDECREF(attrsep); } else { |