File: | src/session.c |
Function: | session_disconnect |
Error: | ob_refcnt of '*_exc' is 1 too high |
112 static PyObject *
113 session_disconnect(SSH2_SessionObj *self, PyObject *args, PyObject *kwds)
114 {
115 int ret;
116 int reason = SSH_DISCONNECT_BY_APPLICATION;
117 char *description = "";
118 char *lang = "";
119 static char *kwlist[] = {"reason", "description", "lang", NULL};
120
121 if (!PyArg_ParseTupleAndKeywords(args, kwds, "|iss:disconnect", kwlist, &reason, &description, &lang))
when _PyArg_ParseTupleAndKeywords_SizeT() succeeds
taking False path
122 return NULL;
123
124 Py_BEGIN_ALLOW_THREADS
releasing the GIL by calling PyEval_SaveThread()
125 ret = libssh2_session_disconnect_ex(self->session, reason, description, lang);
126 Py_END_ALLOW_THREADS
reacquiring the GIL by calling PyEval_RestoreThread()
127
128 CHECK_RETURN_CODE(ret, self)
when considering range: -0x80000000 <= value <= -1
taking True path
when _PyObject_CallFunction_SizeT() succeeds
when _Py_BuildValue_SizeT() succeeds
when PyObject_SetAttrString() succeeds
calling PyErr_SetObject()
new ref from call to _PyObject_CallFunction_SizeT allocated at: CHECK_RETURN_CODE(ret, self)
ob_refcnt is now refs: 1 + N where N >= 0
ob_refcnt is now refs: 1 + N where N >= 1
129
130 self->opened = 0;
131
132 Py_RETURN_NONE;
133 }
ob_refcnt of '*_exc' is 1 too high
was expecting final ob_refcnt to be N + 0 (for some unknown N)
but final ob_refcnt is N + 1
found 3 similar trace(s) to this
File: | src/session.c |
Function: | session_disconnect |
Error: | ob_refcnt of new ref from call to _Py_BuildValue_SizeT is 1 too high |
112 static PyObject *
113 session_disconnect(SSH2_SessionObj *self, PyObject *args, PyObject *kwds)
114 {
115 int ret;
116 int reason = SSH_DISCONNECT_BY_APPLICATION;
117 char *description = "";
118 char *lang = "";
119 static char *kwlist[] = {"reason", "description", "lang", NULL};
120
121 if (!PyArg_ParseTupleAndKeywords(args, kwds, "|iss:disconnect", kwlist, &reason, &description, &lang))
when _PyArg_ParseTupleAndKeywords_SizeT() succeeds
taking False path
122 return NULL;
123
124 Py_BEGIN_ALLOW_THREADS
releasing the GIL by calling PyEval_SaveThread()
125 ret = libssh2_session_disconnect_ex(self->session, reason, description, lang);
126 Py_END_ALLOW_THREADS
reacquiring the GIL by calling PyEval_RestoreThread()
127
128 CHECK_RETURN_CODE(ret, self)
when considering range: -0x80000000 <= value <= -1
taking True path
when _PyObject_CallFunction_SizeT() succeeds
when _Py_BuildValue_SizeT() succeeds
when PyObject_SetAttrString() succeeds
calling PyErr_SetObject()
new ref from call to _Py_BuildValue_SizeT allocated at: CHECK_RETURN_CODE(ret, self)
ob_refcnt is now refs: 1 + N where N >= 0
129
130 self->opened = 0;
131
132 Py_RETURN_NONE;
133 }
ob_refcnt of new ref from call to _Py_BuildValue_SizeT is 1 too high
was expecting final ob_refcnt to be N + 0 (for some unknown N)
but final ob_refcnt is N + 1
found 1 similar trace(s) to this
File: | src/session.c |
Function: | session_disconnect |
Error: | calling PyObject_SetAttrString with NULL as argument 1 (_exc) at src/session.c:128 |
112 static PyObject *
113 session_disconnect(SSH2_SessionObj *self, PyObject *args, PyObject *kwds)
114 {
115 int ret;
116 int reason = SSH_DISCONNECT_BY_APPLICATION;
117 char *description = "";
118 char *lang = "";
119 static char *kwlist[] = {"reason", "description", "lang", NULL};
120
121 if (!PyArg_ParseTupleAndKeywords(args, kwds, "|iss:disconnect", kwlist, &reason, &description, &lang))
when _PyArg_ParseTupleAndKeywords_SizeT() succeeds
taking False path
122 return NULL;
123
124 Py_BEGIN_ALLOW_THREADS
releasing the GIL by calling PyEval_SaveThread()
125 ret = libssh2_session_disconnect_ex(self->session, reason, description, lang);
126 Py_END_ALLOW_THREADS
reacquiring the GIL by calling PyEval_RestoreThread()
127
128 CHECK_RETURN_CODE(ret, self)
when considering range: -0x80000000 <= value <= -1
taking True path
when _PyObject_CallFunction_SizeT() fails
when _Py_BuildValue_SizeT() succeeds
calling PyObject_SetAttrString with NULL as argument 1 (_exc) at src/session.c:128
PyObject_SetAttrString() invokes Py_TYPE() on the pointer, thus accessing (NULL)->ob_type
found 1 similar trace(s) to this
129
130 self->opened = 0;
131
132 Py_RETURN_NONE;
133 }