diff options
author | Victor Stinner <vstinner@python.org> | 2021-01-08 15:01:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-08 15:01:38 +0100 |
commit | e542d417b96077d04aec089505eacb990c9799ae (patch) | |
tree | ef81dfd04b71bd7f8772f8cee4f0b2d7e900d158 /Modules/cjkcodecs | |
parent | bpo-42846: Convert CJK codec extensions to multiphase init (GH-24157) (diff) | |
download | cpython-e542d417b96077d04aec089505eacb990c9799ae.tar.gz cpython-e542d417b96077d04aec089505eacb990c9799ae.tar.bz2 cpython-e542d417b96077d04aec089505eacb990c9799ae.zip |
bpo-42866: Fix refleak in CJK getcodec() (GH-24165)
Fix a reference leak in the getcodec() function of CJK codecs.
Diffstat (limited to 'Modules/cjkcodecs')
-rw-r--r-- | Modules/cjkcodecs/cjkcodecs.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/cjkcodecs/cjkcodecs.h b/Modules/cjkcodecs/cjkcodecs.h index 3b89bc93ed1..ba8fad26055 100644 --- a/Modules/cjkcodecs/cjkcodecs.h +++ b/Modules/cjkcodecs/cjkcodecs.h @@ -291,6 +291,7 @@ getcodec(PyObject *self, PyObject *encoding) r = PyObject_CallOneArg(cofunc, codecobj); Py_DECREF(codecobj); + Py_DECREF(cofunc); return r; } |