File: src/session.c
Function: session_direct_tcpip
Error: ob_refcnt of '*_exc' is 1 too high
747 static PyObject *
748 session_direct_tcpip(SSH2_SessionObj *self, PyObject *args)
749 {
750 	char *host;
751 	char *shost = "127.0.0.1";
752 	int port;
753 	int sport = 22;
754 	LIBSSH2_CHANNEL *channel;
755 
756 	if (!PyArg_ParseTuple(args, "si|si:direct_tcpip", &host, &port, &shost, &sport))
when _PyArg_ParseTuple_SizeT() succeeds
taking False path
757 		return NULL;
758 
759 	Py_BEGIN_ALLOW_THREADS
releasing the GIL by calling PyEval_SaveThread()
760 	channel = libssh2_channel_direct_tcpip_ex(self->session, host, port, shost, sport);
761 	Py_END_ALLOW_THREADS
reacquiring the GIL by calling PyEval_RestoreThread()
762 
763 	CHECK_RETURN_POINTER(channel, self)
when treating unknown struct LIBSSH2_CHANNEL * from src/session.c:760 as NULL
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_POINTER(channel, self)
ob_refcnt is now refs: 1 + N where N >= 0
ob_refcnt is now refs: 1 + N where N >= 1
764 
765 	return (PyObject *)SSH2_Channel_New(channel, self);
766 }
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_direct_tcpip
Error: ob_refcnt of new ref from call to _Py_BuildValue_SizeT is 1 too high
747 static PyObject *
748 session_direct_tcpip(SSH2_SessionObj *self, PyObject *args)
749 {
750 	char *host;
751 	char *shost = "127.0.0.1";
752 	int port;
753 	int sport = 22;
754 	LIBSSH2_CHANNEL *channel;
755 
756 	if (!PyArg_ParseTuple(args, "si|si:direct_tcpip", &host, &port, &shost, &sport))
when _PyArg_ParseTuple_SizeT() succeeds
taking False path
757 		return NULL;
758 
759 	Py_BEGIN_ALLOW_THREADS
releasing the GIL by calling PyEval_SaveThread()
760 	channel = libssh2_channel_direct_tcpip_ex(self->session, host, port, shost, sport);
761 	Py_END_ALLOW_THREADS
reacquiring the GIL by calling PyEval_RestoreThread()
762 
763 	CHECK_RETURN_POINTER(channel, self)
when treating unknown struct LIBSSH2_CHANNEL * from src/session.c:760 as NULL
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_POINTER(channel, self)
ob_refcnt is now refs: 1 + N where N >= 0
764 
765 	return (PyObject *)SSH2_Channel_New(channel, self);
766 }
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_direct_tcpip
Error: calling PyObject_SetAttrString with NULL as argument 1 (_exc) at src/session.c:763
747 static PyObject *
748 session_direct_tcpip(SSH2_SessionObj *self, PyObject *args)
749 {
750 	char *host;
751 	char *shost = "127.0.0.1";
752 	int port;
753 	int sport = 22;
754 	LIBSSH2_CHANNEL *channel;
755 
756 	if (!PyArg_ParseTuple(args, "si|si:direct_tcpip", &host, &port, &shost, &sport))
when _PyArg_ParseTuple_SizeT() succeeds
taking False path
757 		return NULL;
758 
759 	Py_BEGIN_ALLOW_THREADS
releasing the GIL by calling PyEval_SaveThread()
760 	channel = libssh2_channel_direct_tcpip_ex(self->session, host, port, shost, sport);
761 	Py_END_ALLOW_THREADS
reacquiring the GIL by calling PyEval_RestoreThread()
762 
763 	CHECK_RETURN_POINTER(channel, self)
when treating unknown struct LIBSSH2_CHANNEL * from src/session.c:760 as NULL
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:763
PyObject_SetAttrString() invokes Py_TYPE() on the pointer, thus accessing (NULL)->ob_type
found 1 similar trace(s) to this
764 
765 	return (PyObject *)SSH2_Channel_New(channel, self);
766 }