task: Fix refcount leak when assigning attribute of task object

Regression on 1.11
This commit is contained in:
rdb 2024-01-29 16:03:18 +01:00
parent 4b748d1aba
commit f1f15a92a4

View File

@ -301,7 +301,6 @@ __setattr__(PyObject *self, PyObject *attr, PyObject *v) {
PyObject *descr = _PyType_Lookup(Py_TYPE(self), attr);
if (descr != nullptr) {
Py_INCREF(descr);
descrsetfunc f = descr->ob_type->tp_descr_set;
if (f != nullptr) {
return f(descr, self, v);