mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
bpo-47250: Fix refleak from object.__getstate__() (GH-32403)
Co-authored-by: Brandt Bucher <brandt@python.org>
This commit is contained in:
parent
ef6a482b02
commit
e2d78baed3
1 changed files with 0 additions and 1 deletions
|
@ -5030,7 +5030,6 @@ object_getstate_default(PyObject *obj, int required)
|
||||||
|
|
||||||
name = PyList_GET_ITEM(slotnames, i);
|
name = PyList_GET_ITEM(slotnames, i);
|
||||||
Py_INCREF(name);
|
Py_INCREF(name);
|
||||||
value = PyObject_GetAttr(obj, name);
|
|
||||||
if (_PyObject_LookupAttr(obj, name, &value) < 0) {
|
if (_PyObject_LookupAttr(obj, name, &value) < 0) {
|
||||||
Py_DECREF(name);
|
Py_DECREF(name);
|
||||||
goto error;
|
goto error;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue