File: src/session.c
Function: SSH2_Session_New
Error: ob_refcnt of return value is 1 too low
31 SSH2_SessionObj *
32 SSH2_Session_New(LIBSSH2_SESSION *session)
33 {
34 	SSH2_SessionObj *self;
35 
36 	if ((self = PyObject_New(SSH2_SessionObj, &SSH2_Session_Type)) == NULL)
when _PyObject_New() succeeds
taking False path
_PyObject_New allocated at: 	if ((self = PyObject_New(SSH2_SessionObj, &SSH2_Session_Type)) == NULL)
ob_refcnt is now refs: 1 + N where N >= 0
37 		return NULL;
38 
39 	self->session = session;
40 	self->opened  = 0;
41 	self->socket  = Py_None;
42 
43 	self->cb_ignore     = Py_None;
44 	self->cb_debug      = Py_None;
45 	self->cb_disconnect = Py_None;
46 	self->cb_macerror   = Py_None;
47 	self->cb_x11        = Py_None;
48 
49 	self->cb_passwd_changereq = Py_None;
50 	self->cb_kbdint_response  = Py_None;
51 
52 	Py_INCREF(Py_None);
53 	Py_INCREF(Py_None);
54 	Py_INCREF(Py_None);
55 	Py_INCREF(Py_None);
56 	Py_INCREF(Py_None);
57 	Py_INCREF(Py_None);
58 	Py_INCREF(Py_None);
59 	Py_INCREF(Py_None);
60 
61 	*libssh2_session_abstract(session) = self;
when treating unknown void * * from src/session.c:61 as non-NULL
return value is now referenced by 1 non-stack value(s): heap-region-83
62 	libssh2_banner_set(session, LIBSSH2_SSH_DEFAULT_BANNER " Python");
63 
64 	return self;
65 }
ob_refcnt of return value is 1 too low
was expecting final ob_refcnt to be N + 2 (for some unknown N)
due to object being referenced by: return value, heap-region-83
but final ob_refcnt is N + 1