mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
Issue #26718: super.__init__ no longer leaks memory if called multiple times.
NOTE: A direct call of super.__init__ is not endorsed!
This commit is contained in:
commit
131b8f8eee
3 changed files with 15 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue