File: src/session.c
Function: session_method_pref
Error: ob_refcnt of '*_exc' is 1 too high
517 static PyObject *
518 session_method_pref(SSH2_SessionObj *self, PyObject *args)
519 {
520 	int ret;
521 	int method;
522 	char *pref;
523 
524 	if (!PyArg_ParseTuple(args, "is:method_pref", &method, &pref))
when _PyArg_ParseTuple_SizeT() succeeds
taking False path
525 		return NULL;
526 
527 	ret = libssh2_session_method_pref(self->session, method, pref);
528 
529 	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
530 
531 	Py_RETURN_NONE;
532 }
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_method_pref
Error: ob_refcnt of new ref from call to _Py_BuildValue_SizeT is 1 too high
517 static PyObject *
518 session_method_pref(SSH2_SessionObj *self, PyObject *args)
519 {
520 	int ret;
521 	int method;
522 	char *pref;
523 
524 	if (!PyArg_ParseTuple(args, "is:method_pref", &method, &pref))
when _PyArg_ParseTuple_SizeT() succeeds
taking False path
525 		return NULL;
526 
527 	ret = libssh2_session_method_pref(self->session, method, pref);
528 
529 	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
530 
531 	Py_RETURN_NONE;
532 }
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_method_pref
Error: calling PyObject_SetAttrString with NULL as argument 1 (_exc) at src/session.c:529
517 static PyObject *
518 session_method_pref(SSH2_SessionObj *self, PyObject *args)
519 {
520 	int ret;
521 	int method;
522 	char *pref;
523 
524 	if (!PyArg_ParseTuple(args, "is:method_pref", &method, &pref))
when _PyArg_ParseTuple_SizeT() succeeds
taking False path
525 		return NULL;
526 
527 	ret = libssh2_session_method_pref(self->session, method, pref);
528 
529 	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:529
PyObject_SetAttrString() invokes Py_TYPE() on the pointer, thus accessing (NULL)->ob_type
found 1 similar trace(s) to this
530 
531 	Py_RETURN_NONE;
532 }