mirror of
https://github.com/python/cpython.git
synced 2024-11-24 10:24:35 +08:00
bpo-42866: Fix refleak in CJK getcodec() (GH-24165)
Fix a reference leak in the getcodec() function of CJK codecs.
This commit is contained in:
parent
07f2cee93f
commit
e542d417b9
@ -0,0 +1,2 @@
|
||||
Fix a reference leak in the ``getcodec()`` function of CJK codecs. Patch by
|
||||
Victor Stinner.
|
@ -291,6 +291,7 @@ getcodec(PyObject *self, PyObject *encoding)
|
||||
|
||||
r = PyObject_CallOneArg(cofunc, codecobj);
|
||||
Py_DECREF(codecobj);
|
||||
Py_DECREF(cofunc);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user