From: Neal Norwitz Date: Tue, 1 Apr 2008 07:37:58 +0000 (+0000) Subject: Fix a refleak X-Git-Tag: v3.0a4~11 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d2bee32e9e0030dee22249a18998c079eec3b8cb;p=thirdparty%2FPython%2Fcpython.git Fix a refleak --- diff --git a/Modules/itertoolsmodule.c b/Modules/itertoolsmodule.c index 61128d2aa870..a8063c5e1a05 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())