diff Modules/itertoolsmodule.c @ 46238:d86b333c72e7

Fix a refleak
author Neal Norwitz <nnorwitz@gmail.com>
date Tue, 01 Apr 2008 07:37:58 +0000
parents 832c820e9d14
children 7d824fd131ad
line wrap: on
line diff
--- a/Modules/itertoolsmodule.c	Tue Apr 01 06:17:46 2008 +0000
+++ b/Modules/itertoolsmodule.c	Tue Apr 01 07:37:58 2008 +0000
@@ -2133,7 +2133,7 @@
 	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())