From: Neal Norwitz Date: Thu, 27 Jul 2006 03:55:39 +0000 (+0000) Subject: Closure can't be NULL at this point since we know it's a tuple. X-Git-Tag: v2.5b3~143 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=101bac205d6938316872b74201c4c6efe2bce340;p=python Closure can't be NULL at this point since we know it's a tuple. Reported by Klocwork # 74. --- diff --git a/Objects/funcobject.c b/Objects/funcobject.c index e514eeb2d3..1ba74c5a92 100644 --- a/Objects/funcobject.c +++ b/Objects/funcobject.c @@ -141,7 +141,7 @@ PyFunction_SetClosure(PyObject *op, PyObject *closure) if (closure == Py_None) closure = NULL; else if (PyTuple_Check(closure)) { - Py_XINCREF(closure); + Py_INCREF(closure); } else { PyErr_Format(PyExc_SystemError,