summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-04-13 12:28:53 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-04-13 12:28:53 (GMT)
commit131b8f8eee3498d5d334bde9671825bdfe0cf222 (patch)
tree2b2ac519811dd9ee8f0029375eaf18642e91180c /Objects
parent6fce35354a7fecb9130fd163f86822c468d1413e (diff)
parent3d7497608ba8dd0b82d69944f484febdad7dc507 (diff)
downloadcpython-131b8f8eee3498d5d334bde9671825bdfe0cf222.zip
cpython-131b8f8eee3498d5d334bde9671825bdfe0cf222.tar.gz
cpython-131b8f8eee3498d5d334bde9671825bdfe0cf222.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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 865c6eb..1bad9af 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -7350,9 +7350,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;
}