summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-07-16 02:02:57 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2006-07-16 02:02:57 (GMT)
commitce5b3c3188ec655ece4428e6a3e1622e322f4603 (patch)
tree8f5c5eac4e88e0e9d21a7ff9fd5c404b4ba941f0
parentef02b9e1445b7c7ae60c790a68ed1e0e75dfe435 (diff)
downloadcpython-ce5b3c3188ec655ece4428e6a3e1622e322f4603.zip
cpython-ce5b3c3188ec655ece4428e6a3e1622e322f4603.tar.gz
cpython-ce5b3c3188ec655ece4428e6a3e1622e322f4603.tar.bz2
self is dereffed (and passed as first arg), so it's known to be good.
func is returned from PyArg_ParseTuple and also dereffed. Reported by Klocwork, #30 (self one at least).
-rw-r--r--Modules/_tkinter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c
index ee9a633..640b70f 100644
--- a/Modules/_tkinter.c
+++ b/Modules/_tkinter.c
@@ -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;