[Python-checkins] bpo-47250: Fix refleak from object.__getstate__() (GH-32403)
corona10
webhook-mailer at python.org
Thu Apr 7 19:27:30 EDT 2022
https://github.com/python/cpython/commit/e2d78baed385c349d756e96d8f0def0268fa9c4f
commit: e2d78baed385c349d756e96d8f0def0268fa9c4f
branch: main
author: Dong-hee Na <donghee.na at python.org>
committer: corona10 <donghee.na92 at gmail.com>
date: 2022-04-08T08:27:00+09:00
summary:
bpo-47250: Fix refleak from object.__getstate__() (GH-32403)
Co-authored-by: Brandt Bucher <brandt at python.org>
files:
M Objects/typeobject.c
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 64c4bbb5a93260..f529e18134025b 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;
More information about the Python-checkins
mailing list