diff options
author | Oren Milman <orenmn@gmail.com> | 2018-02-13 10:28:33 (GMT) |
---|---|---|
committer | INADA Naoki <methane@users.noreply.github.com> | 2018-02-13 10:28:33 (GMT) |
commit | d019bc8319ea35e93bf4baa38098ff1b57cd3ee5 (patch) | |
tree | d9b927eba02059f8be8465d35b6969254b172b8e /Modules/_hashopenssl.c | |
parent | aec7532ed3ccbd29d3429a3f375e25f956c44003 (diff) | |
download | cpython-d019bc8319ea35e93bf4baa38098ff1b57cd3ee5.zip cpython-d019bc8319ea35e93bf4baa38098ff1b57cd3ee5.tar.gz cpython-d019bc8319ea35e93bf4baa38098ff1b57cd3ee5.tar.bz2 |
bpo-31787: Prevent refleaks when calling __init__() more than once (GH-3995)
Diffstat (limited to 'Modules/_hashopenssl.c')
-rw-r--r-- | Modules/_hashopenssl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_hashopenssl.c b/Modules/_hashopenssl.c index 44d3f63..b6dcc06 100644 --- a/Modules/_hashopenssl.c +++ b/Modules/_hashopenssl.c @@ -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) { |