mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +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
1 changed files with 3 additions and 1 deletions
|
@ -2324,7 +2324,9 @@ AttributeError_reduce(PyAttributeErrorObject *self, PyObject *Py_UNUSED(ignored)
|
|||
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[] = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue