summaryrefslogtreecommitdiff
path: root/Modules/itertoolsmodule.c
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2008-04-01 07:37:58 +0000
committerNeal Norwitz <nnorwitz@gmail.com>2008-04-01 07:37:58 +0000
commit38a260adb788058d8522887b900ed15984dfe8ae (patch)
tree43d683e350bb39e2f267ea0e237eb2dc03e73ed2 /Modules/itertoolsmodule.c
parentce43f0b6f1f6c71a8660e1bac596080cb04c729f (diff)
downloadcpython-38a260adb788058d8522887b900ed15984dfe8ae.tar.gz
Fix a refleak
Diffstat (limited to 'Modules/itertoolsmodule.c')
-rw-r--r--Modules/itertoolsmodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/itertoolsmodule.c b/Modules/itertoolsmodule.c
index 61128d2aa8..a8063c5e1a 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())