diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-04-13 12:27:33 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-04-13 12:27:33 (GMT) |
commit | 3d7497608ba8dd0b82d69944f484febdad7dc507 (patch) | |
tree | e99465f79d61aa0aa75b9ccc062fbe5f8902e9e2 /Objects | |
parent | a3c532b0ed888ae5b7287f1484c311be9d324d70 (diff) | |
download | cpython-3d7497608ba8dd0b82d69944f484febdad7dc507.zip cpython-3d7497608ba8dd0b82d69944f484febdad7dc507.tar.gz cpython-3d7497608ba8dd0b82d69944f484febdad7dc507.tar.bz2 |
Issue #26718: super.__init__ no longer leaks memory if called multiple times.
NOTE: A direct call of super.__init__ is not endorsed!
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/typeobject.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c index f88a5fb..3a09af5 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -7336,9 +7336,9 @@ super_init(PyObject *self, PyObject *args, PyObject *kwds) Py_INCREF(obj); } Py_INCREF(type); - su->type = type; - su->obj = obj; - su->obj_type = obj_type; + Py_XSETREF(su->type, type); + Py_XSETREF(su->obj, obj); + Py_XSETREF(su->obj_type, obj_type); return 0; } |