summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2003-06-17 23:14:40 (GMT)
committerRaymond Hettinger <python@rcn.com>2003-06-17 23:14:40 (GMT)
commit7d98fb9806907ae6849f57c66af9248952120cd9 (patch)
tree96b5048e7a0dfd9403c0f2c72b2ce9f91ba48b3e /Modules
parent783eaf4774006d8cb6362d4136c88e74b36a0b77 (diff)
downloadcpython-7d98fb9806907ae6849f57c66af9248952120cd9.zip
cpython-7d98fb9806907ae6849f57c66af9248952120cd9.tar.gz
cpython-7d98fb9806907ae6849f57c66af9248952120cd9.tar.bz2
Add missing DECREF.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/itertoolsmodule.c4
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;