diff options
author | Zackery Spytz <zspytz@gmail.com> | 2019-03-26 06:05:29 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2019-03-26 06:05:29 (GMT) |
commit | 0523c39e7720b82b38ad793d3f1a5681adcdf873 (patch) | |
tree | ba1647c6e08c27a50358fa27ec42b1ace4fab764 /Modules | |
parent | 3e700e4ca3922337a24dc150238a6da724cfe873 (diff) | |
download | cpython-0523c39e7720b82b38ad793d3f1a5681adcdf873.zip cpython-0523c39e7720b82b38ad793d3f1a5681adcdf873.tar.gz cpython-0523c39e7720b82b38ad793d3f1a5681adcdf873.tar.bz2 |
bpo-36430: Fix a possible reference leak in itertools.count(). (GH-12551)
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/itertoolsmodule.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/itertoolsmodule.c b/Modules/itertoolsmodule.c index 536f7fa..103029d 100644 --- a/Modules/itertoolsmodule.c +++ b/Modules/itertoolsmodule.c @@ -4089,6 +4089,7 @@ itertools_count_impl(PyTypeObject *type, PyObject *long_cnt, lz = (countobject *)type->tp_alloc(type, 0); if (lz == NULL) { Py_XDECREF(long_cnt); + Py_DECREF(long_step); return NULL; } lz->cnt = cnt; |