mirror of https://github.com/python/cpython.git
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
|
@ -5030,7 +5030,6 @@ object_getstate_default(PyObject *obj, int required)
|
|||
|
||||
name = PyList_GET_ITEM(slotnames, i);
|
||||
Py_INCREF(name);
|
||||
value = PyObject_GetAttr(obj, name);
|
||||
if (_PyObject_LookupAttr(obj, name, &value) < 0) {
|
||||
Py_DECREF(name);
|
||||
goto error;
|
||||
|
|
Loading…
Reference in New Issue