]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Add missing DECREF.
authorRaymond Hettinger <python@rcn.com>
Tue, 17 Jun 2003 23:14:40 +0000 (23:14 +0000)
committerRaymond Hettinger <python@rcn.com>
Tue, 17 Jun 2003 23:14:40 +0000 (23:14 +0000)
Modules/itertoolsmodule.c

index e2e820e63861242d6e77bb0a8efeb0895a2d7d43..0a20c1b568220397ed14e34224ba46723d8c5d26 100644 (file)
@@ -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;