bpo-47250: Fix refleak from object.__getstate__() (GH-32403)

Co-authored-by: Brandt Bucher <brandt@python.org>
This commit is contained in:
Dong-hee Na 2022-04-08 08:27:00 +09:00 committed by GitHub
parent ef6a482b02
commit e2d78baed3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 1 deletions

View File

@ -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;