File: src/session.c
Function: session_userauth_hostbased_fromfile
Error: ob_refcnt of '*_exc' is 1 too high
345 static PyObject *
346 session_userauth_hostbased_fromfile(SSH2_SessionObj *self, PyObject *args)
347 {
348 	char *username;
349 	char *publickey;
350 	char *privatekey;
351 	char *passphrase;
352 	char *hostname;
353 	char *local_username = NULL;
354 	Py_ssize_t username_len;
355 	Py_ssize_t hostname_len;
356 	Py_ssize_t local_username_len;
357 	int ret;
358 
359 	if (!PyArg_ParseTuple(args, "s#ssss#|s#:userauth_hostbased_fromfile",
when _PyArg_ParseTuple_SizeT() succeeds
taking False path
360 	                      &username, &username_len,
361 	                      &publickey, &privatekey, &passphrase,
362 	                      &hostname, &hostname_len,
363 	                      &local_username, &local_username_len))
364 		return NULL;
365 
366 	if (local_username == NULL) {
when treating unknown const char * from src/session.c:359 as non-NULL
taking False path
367 		local_username     = username;
368 		local_username_len = username_len;
369 	}
370 
371 	Py_BEGIN_ALLOW_THREADS
releasing the GIL by calling PyEval_SaveThread()
372 	ret = libssh2_userauth_hostbased_fromfile_ex(self->session,
373 	                                             username, username_len,
374 	                                             publickey, privatekey, passphrase,
375 	                                             hostname, hostname_len,
376 	                                             local_username, local_username_len);
377 	Py_END_ALLOW_THREADS
reacquiring the GIL by calling PyEval_RestoreThread()
378 
379 	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
380 
381 	Py_RETURN_NONE;
382 }
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_userauth_hostbased_fromfile
Error: ob_refcnt of new ref from call to _Py_BuildValue_SizeT is 1 too high
345 static PyObject *
346 session_userauth_hostbased_fromfile(SSH2_SessionObj *self, PyObject *args)
347 {
348 	char *username;
349 	char *publickey;
350 	char *privatekey;
351 	char *passphrase;
352 	char *hostname;
353 	char *local_username = NULL;
354 	Py_ssize_t username_len;
355 	Py_ssize_t hostname_len;
356 	Py_ssize_t local_username_len;
357 	int ret;
358 
359 	if (!PyArg_ParseTuple(args, "s#ssss#|s#:userauth_hostbased_fromfile",
when _PyArg_ParseTuple_SizeT() succeeds
taking False path
360 	                      &username, &username_len,
361 	                      &publickey, &privatekey, &passphrase,
362 	                      &hostname, &hostname_len,
363 	                      &local_username, &local_username_len))
364 		return NULL;
365 
366 	if (local_username == NULL) {
when treating unknown const char * from src/session.c:359 as non-NULL
taking False path
367 		local_username     = username;
368 		local_username_len = username_len;
369 	}
370 
371 	Py_BEGIN_ALLOW_THREADS
releasing the GIL by calling PyEval_SaveThread()
372 	ret = libssh2_userauth_hostbased_fromfile_ex(self->session,
373 	                                             username, username_len,
374 	                                             publickey, privatekey, passphrase,
375 	                                             hostname, hostname_len,
376 	                                             local_username, local_username_len);
377 	Py_END_ALLOW_THREADS
reacquiring the GIL by calling PyEval_RestoreThread()
378 
379 	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
380 
381 	Py_RETURN_NONE;
382 }
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_userauth_hostbased_fromfile
Error: calling PyObject_SetAttrString with NULL as argument 1 (_exc) at src/session.c:379
345 static PyObject *
346 session_userauth_hostbased_fromfile(SSH2_SessionObj *self, PyObject *args)
347 {
348 	char *username;
349 	char *publickey;
350 	char *privatekey;
351 	char *passphrase;
352 	char *hostname;
353 	char *local_username = NULL;
354 	Py_ssize_t username_len;
355 	Py_ssize_t hostname_len;
356 	Py_ssize_t local_username_len;
357 	int ret;
358 
359 	if (!PyArg_ParseTuple(args, "s#ssss#|s#:userauth_hostbased_fromfile",
when _PyArg_ParseTuple_SizeT() succeeds
taking False path
360 	                      &username, &username_len,
361 	                      &publickey, &privatekey, &passphrase,
362 	                      &hostname, &hostname_len,
363 	                      &local_username, &local_username_len))
364 		return NULL;
365 
366 	if (local_username == NULL) {
when treating unknown const char * from src/session.c:359 as non-NULL
taking False path
367 		local_username     = username;
368 		local_username_len = username_len;
369 	}
370 
371 	Py_BEGIN_ALLOW_THREADS
releasing the GIL by calling PyEval_SaveThread()
372 	ret = libssh2_userauth_hostbased_fromfile_ex(self->session,
373 	                                             username, username_len,
374 	                                             publickey, privatekey, passphrase,
375 	                                             hostname, hostname_len,
376 	                                             local_username, local_username_len);
377 	Py_END_ALLOW_THREADS
reacquiring the GIL by calling PyEval_RestoreThread()
378 
379 	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:379
PyObject_SetAttrString() invokes Py_TYPE() on the pointer, thus accessing (NULL)->ob_type
found 3 similar trace(s) to this
380 
381 	Py_RETURN_NONE;
382 }