Add missing DECREF.

This commit is contained in:
Raymond Hettinger 2003-06-17 23:14:40 +00:00
parent 783eaf4774
commit 7d98fb9806

View File

@ -1010,8 +1010,10 @@ chain_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
/* create chainobject structure */ /* create chainobject structure */
lz = (chainobject *)type->tp_alloc(type, 0); lz = (chainobject *)type->tp_alloc(type, 0);
if (lz == NULL) if (lz == NULL) {
Py_DECREF(ittuple);
return NULL; return NULL;
}
lz->ittuple = ittuple; lz->ittuple = ittuple;
lz->iternum = 0; lz->iternum = 0;