summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2008-04-01 07:37:58 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2008-04-01 07:37:58 (GMT)
commitd2bee32e9e0030dee22249a18998c079eec3b8cb (patch)
tree4f4624069cde7716953bb0163f43155732054a1c
parente1e9f235c29763661a106cc00ac55740ef212da3 (diff)
downloadcpython-d2bee32e9e0030dee22249a18998c079eec3b8cb.zip
cpython-d2bee32e9e0030dee22249a18998c079eec3b8cb.tar.gz
cpython-d2bee32e9e0030dee22249a18998c079eec3b8cb.tar.bz2
Fix a refleak
-rw-r--r--Modules/itertoolsmodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/itertoolsmodule.c b/Modules/itertoolsmodule.c
index 61128d2..a8063c5 100644
--- a/Modules/itertoolsmodule.c
+++ b/Modules/itertoolsmodule.c
@@ -2133,7 +2133,7 @@ permutations_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
if (robj != Py_None) {
if (!PyLong_Check(robj)) {
PyErr_SetString(PyExc_TypeError, "Expected int as r");
- return NULL;
+ goto error;
}
r = PyLong_AsSsize_t(robj);
if (r == -1 && PyErr_Occurred())