From e2d78baed385c349d756e96d8f0def0268fa9c4f Mon Sep 17 00:00:00 2001 From: Dong-hee Na Date: Fri, 8 Apr 2022 08:27:00 +0900 Subject: [PATCH] bpo-47250: Fix refleak from object.__getstate__() (GH-32403) Co-authored-by: Brandt Bucher --- Objects/typeobject.c | 1 - 1 file changed, 1 deletion(-) diff --git a/Objects/typeobject.c b/Objects/typeobject.c index 64c4bbb5a93..f529e181340 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -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;