]> granicus.if.org Git - python/commitdiff
Closure can't be NULL at this point since we know it's a tuple.
authorNeal Norwitz <nnorwitz@gmail.com>
Thu, 27 Jul 2006 03:55:39 +0000 (03:55 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Thu, 27 Jul 2006 03:55:39 +0000 (03:55 +0000)
Reported by Klocwork # 74.

Objects/funcobject.c

index e514eeb2d3fd2e4c4f396c37703a0bc51a051f0e..1ba74c5a926eb7963084313d1f061a4d466d900d 100644 (file)
@@ -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,