mirror of
https://github.com/python/cpython.git
synced 2025-11-01 02:38:53 +00:00
bpo-31787: Prevent refleaks when calling __init__() more than once (GH-3995)
This commit is contained in:
parent
aec7532ed3
commit
d019bc8319
13 changed files with 105 additions and 19 deletions
|
|
@ -369,8 +369,8 @@ EVP_tp_init(EVPobject *self, PyObject *args, PyObject *kwds)
|
|||
return -1;
|
||||
}
|
||||
|
||||
self->name = name_obj;
|
||||
Py_INCREF(self->name);
|
||||
Py_INCREF(name_obj);
|
||||
Py_XSETREF(self->name, name_obj);
|
||||
|
||||
if (data_obj) {
|
||||
if (view.len >= HASHLIB_GIL_MINSIZE) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue