diff options
author | Dong-hee Na <donghee.na@python.org> | 2022-04-07 23:27:00 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-07 23:27:00 (GMT) |
commit | e2d78baed385c349d756e96d8f0def0268fa9c4f (patch) | |
tree | da82fa98ab9d379518b714051d50fccff397fd27 | |
parent | ef6a482b0285870c45f39c9b17ed827362b334ae (diff) | |
download | cpython-e2d78baed385c349d756e96d8f0def0268fa9c4f.zip cpython-e2d78baed385c349d756e96d8f0def0268fa9c4f.tar.gz cpython-e2d78baed385c349d756e96d8f0def0268fa9c4f.tar.bz2 |
bpo-47250: Fix refleak from object.__getstate__() (GH-32403)
Co-authored-by: Brandt Bucher <brandt@python.org>
-rw-r--r-- | Objects/typeobject.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c index 64c4bbb..f529e18 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; |