mirror of https://github.com/python/cpython
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).
This commit is contained in:
parent
ef02b9e144
commit
ce5b3c3188
|
@ -2104,8 +2104,8 @@ Tkapp_CreateCommand(PyObject *selfptr, PyObject *args)
|
||||||
data = PyMem_NEW(PythonCmd_ClientData, 1);
|
data = PyMem_NEW(PythonCmd_ClientData, 1);
|
||||||
if (!data)
|
if (!data)
|
||||||
return PyErr_NoMemory();
|
return PyErr_NoMemory();
|
||||||
Py_XINCREF(self);
|
Py_INCREF(self);
|
||||||
Py_XINCREF(func);
|
Py_INCREF(func);
|
||||||
data->self = selfptr;
|
data->self = selfptr;
|
||||||
data->func = func;
|
data->func = func;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue