]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
self is dereffed (and passed as first arg), so it's known to be good.
authorNeal Norwitz <nnorwitz@gmail.com>
Sun, 16 Jul 2006 02:02:57 +0000 (02:02 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Sun, 16 Jul 2006 02:02:57 +0000 (02:02 +0000)
func is returned from PyArg_ParseTuple and also dereffed.

Reported by Klocwork, #30 (self one at least).

Modules/_tkinter.c

index ee9a63369236b6be99f2ec33e3d2d7199a7a309c..640b70f0ff5fa03800f1245effea1787965bd15b 100644 (file)
@@ -2104,8 +2104,8 @@ Tkapp_CreateCommand(PyObject *selfptr, PyObject *args)
        data = PyMem_NEW(PythonCmd_ClientData, 1);
        if (!data)
                return PyErr_NoMemory();
-       Py_XINCREF(self);
-       Py_XINCREF(func);
+       Py_INCREF(self);
+       Py_INCREF(func);
        data->self = selfptr;
        data->func = func;