diff options
author | Raymond Hettinger <python@rcn.com> | 2003-06-17 23:14:40 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2003-06-17 23:14:40 (GMT) |
commit | 7d98fb9806907ae6849f57c66af9248952120cd9 (patch) | |
tree | 96b5048e7a0dfd9403c0f2c72b2ce9f91ba48b3e /Modules/itertoolsmodule.c | |
parent | 783eaf4774006d8cb6362d4136c88e74b36a0b77 (diff) | |
download | cpython-7d98fb9806907ae6849f57c66af9248952120cd9.zip cpython-7d98fb9806907ae6849f57c66af9248952120cd9.tar.gz cpython-7d98fb9806907ae6849f57c66af9248952120cd9.tar.bz2 |
Add missing DECREF.
Diffstat (limited to 'Modules/itertoolsmodule.c')
-rw-r--r-- | Modules/itertoolsmodule.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/itertoolsmodule.c b/Modules/itertoolsmodule.c index e2e820e..0a20c1b 100644 --- a/Modules/itertoolsmodule.c +++ b/Modules/itertoolsmodule.c @@ -1010,8 +1010,10 @@ chain_new(PyTypeObject *type, PyObject *args, PyObject *kwds) /* create chainobject structure */ lz = (chainobject *)type->tp_alloc(type, 0); - if (lz == NULL) + if (lz == NULL) { + Py_DECREF(ittuple); return NULL; + } lz->ittuple = ittuple; lz->iternum = 0; |