mirror of
https://github.com/python/cpython
synced 2024-09-06 03:34:04 +00:00
gh-104454: Fix refleak in AttributeError_reduce (#104455)
* Fix the reference leak introduced by https://github.com/python/cpython/issues/103333 Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
This commit is contained in:
parent
46f1c78eeb
commit
7d2deafb73
|
@ -2324,7 +2324,9 @@ AttributeError_reduce(PyAttributeErrorObject *self, PyObject *Py_UNUSED(ignored)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return PyTuple_Pack(3, Py_TYPE(self), self->args, state);
|
PyObject *return_value = PyTuple_Pack(3, Py_TYPE(self), self->args, state);
|
||||||
|
Py_DECREF(state);
|
||||||
|
return return_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyMemberDef AttributeError_members[] = {
|
static PyMemberDef AttributeError_members[] = {
|
||||||
|
|
Loading…
Reference in a new issue