File: src/session.c
Function: session_startup
Error: ob_refcnt of '*_exc' is 1 too high
82 static PyObject *
83 session_startup(SSH2_SessionObj *self, PyObject *args)
84 {
85 	PyObject *sock;
86 	int ret;
87 	int fd;
88 
89 	if (!PyArg_ParseTuple(args, "O:startup", &sock))
when _PyArg_ParseTuple_SizeT() succeeds
taking False path
90 		return NULL;
91 
92 	if ((fd = PyObject_AsFileDescriptor(sock)) == -1) {
when PyObject_AsFileDescriptor() returns
when considering range: -0x80000000 <= value <= -2
taking False path
93 		PyErr_SetString(PyExc_ValueError, "argument must be a file descriptor");
94 		return NULL;
95 	}
96 
97 	Py_BEGIN_ALLOW_THREADS
releasing the GIL by calling PyEval_SaveThread()
98 	ret=libssh2_session_startup(self->session, fd);
99 	Py_END_ALLOW_THREADS
reacquiring the GIL by calling PyEval_RestoreThread()
100 
101 	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
102 
103 	Py_DECREF(self->socket);
104 	Py_INCREF(sock);
105 
106 	self->socket = sock;
107 	self->opened = 1;
108 
109 	Py_RETURN_NONE;
110 }
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 7 similar trace(s) to this

File: src/session.c
Function: session_startup
Error: ob_refcnt of new ref from call to _Py_BuildValue_SizeT is 1 too high
82 static PyObject *
83 session_startup(SSH2_SessionObj *self, PyObject *args)
84 {
85 	PyObject *sock;
86 	int ret;
87 	int fd;
88 
89 	if (!PyArg_ParseTuple(args, "O:startup", &sock))
when _PyArg_ParseTuple_SizeT() succeeds
taking False path
90 		return NULL;
91 
92 	if ((fd = PyObject_AsFileDescriptor(sock)) == -1) {
when PyObject_AsFileDescriptor() returns
when considering range: -0x80000000 <= value <= -2
taking False path
93 		PyErr_SetString(PyExc_ValueError, "argument must be a file descriptor");
94 		return NULL;
95 	}
96 
97 	Py_BEGIN_ALLOW_THREADS
releasing the GIL by calling PyEval_SaveThread()
98 	ret=libssh2_session_startup(self->session, fd);
99 	Py_END_ALLOW_THREADS
reacquiring the GIL by calling PyEval_RestoreThread()
100 
101 	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
102 
103 	Py_DECREF(self->socket);
104 	Py_INCREF(sock);
105 
106 	self->socket = sock;
107 	self->opened = 1;
108 
109 	Py_RETURN_NONE;
110 }
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 3 similar trace(s) to this

File: src/session.c
Function: session_startup
Error: calling PyObject_SetAttrString with NULL as argument 1 (_exc) at src/session.c:101
82 static PyObject *
83 session_startup(SSH2_SessionObj *self, PyObject *args)
84 {
85 	PyObject *sock;
86 	int ret;
87 	int fd;
88 
89 	if (!PyArg_ParseTuple(args, "O:startup", &sock))
when _PyArg_ParseTuple_SizeT() succeeds
taking False path
90 		return NULL;
91 
92 	if ((fd = PyObject_AsFileDescriptor(sock)) == -1) {
when PyObject_AsFileDescriptor() returns
when considering range: -0x80000000 <= value <= -2
taking False path
93 		PyErr_SetString(PyExc_ValueError, "argument must be a file descriptor");
94 		return NULL;
95 	}
96 
97 	Py_BEGIN_ALLOW_THREADS
releasing the GIL by calling PyEval_SaveThread()
98 	ret=libssh2_session_startup(self->session, fd);
99 	Py_END_ALLOW_THREADS
reacquiring the GIL by calling PyEval_RestoreThread()
100 
101 	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:101
PyObject_SetAttrString() invokes Py_TYPE() on the pointer, thus accessing (NULL)->ob_type
found 3 similar trace(s) to this
102 
103 	Py_DECREF(self->socket);
104 	Py_INCREF(sock);
105 
106 	self->socket = sock;
107 	self->opened = 1;
108 
109 	Py_RETURN_NONE;
110 }