File: krb5module.c
Function: AuthContext_mk_priv
Error: ob_refcnt of new ref from call to PyObject_GetAttrString is 1 too high
1932 static PyObject *
1933 AuthContext_mk_priv(PyObject *unself __UNUSED, PyObject *args)
1934 {
1935   PyObject *self, *tmp, *retval;
1936   krb5_data inbuf, outbuf;
1937   krb5_auth_context ac = NULL;
1938   krb5_error_code rc;
1939   krb5_context ctx = NULL;
1940   krb5_replay_data rdata = {0, 0, 0};
1941 
1942   if(!PyArg_ParseTuple(args, "Os#", &self, &inbuf.data, &inbuf.length))
when PyArg_ParseTuple() succeeds
taking False path
1943     return NULL;
1944 
1945   tmp = PyObject_GetAttrString(self, "context");
when PyObject_GetAttrString() succeeds
new ref from call to PyObject_GetAttrString allocated at:   tmp = PyObject_GetAttrString(self, "context");
ob_refcnt is now refs: 1 + N where N >= 0
1946   if(tmp)
taking True path
1947     {
1948       tmp = PyObject_GetAttrString(tmp, "_ctx");
when PyObject_GetAttrString() succeeds
1949       if(tmp)
taking True path
1950 	ctx = PyCObject_AsVoidPtr(tmp);
when PyCObject_AsVoidPtr() returns
1951       if(!ctx)
when treating unknown void * from krb5module.c:1950 as non-NULL
taking False path
1952 	return NULL;
1953     }
1954   else
1955     return NULL;
1956   tmp = PyObject_GetAttrString(self, "_ac");
when PyObject_GetAttrString() succeeds
1957   if(tmp)
taking True path
1958     ac = PyCObject_AsVoidPtr(tmp);
when PyCObject_AsVoidPtr() returns
1959   if(!ac)
when treating unknown void * from krb5module.c:1958 as non-NULL
taking False path
1960     return NULL;
1961 
1962   memset(&outbuf, 0, sizeof(outbuf));
1963   rc = krb5_mk_priv(ctx, ac, &inbuf, &outbuf, &rdata);
1964   if(rc)
when considering range: -0x80000000 <= value <= -1
taking True path
1965     return pk_error(rc);
when pk_error() succeeds
1966 
1967   retval = PyString_FromStringAndSize(outbuf.data, outbuf.length);
1968   free(outbuf.data);
1969   return retval;
1970 } /* KrbV.AuthContext.mk_priv() */
ob_refcnt of new ref from call to PyObject_GetAttrString 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 24 similar trace(s) to this

File: krb5module.c
Function: AuthContext_mk_priv
Error: returning (PyObject*)NULL without setting an exception
1932 static PyObject *
1933 AuthContext_mk_priv(PyObject *unself __UNUSED, PyObject *args)
1934 {
1935   PyObject *self, *tmp, *retval;
1936   krb5_data inbuf, outbuf;
1937   krb5_auth_context ac = NULL;
1938   krb5_error_code rc;
1939   krb5_context ctx = NULL;
1940   krb5_replay_data rdata = {0, 0, 0};
1941 
1942   if(!PyArg_ParseTuple(args, "Os#", &self, &inbuf.data, &inbuf.length))
when PyArg_ParseTuple() succeeds
taking False path
1943     return NULL;
1944 
1945   tmp = PyObject_GetAttrString(self, "context");
when PyObject_GetAttrString() succeeds
1946   if(tmp)
taking True path
1947     {
1948       tmp = PyObject_GetAttrString(tmp, "_ctx");
when PyObject_GetAttrString() succeeds
1949       if(tmp)
taking True path
1950 	ctx = PyCObject_AsVoidPtr(tmp);
when PyCObject_AsVoidPtr() returns
1951       if(!ctx)
when treating unknown void * from krb5module.c:1950 as non-NULL
taking False path
1952 	return NULL;
1953     }
1954   else
1955     return NULL;
1956   tmp = PyObject_GetAttrString(self, "_ac");
when PyObject_GetAttrString() succeeds
1957   if(tmp)
taking True path
1958     ac = PyCObject_AsVoidPtr(tmp);
when PyCObject_AsVoidPtr() returns
1959   if(!ac)
when treating unknown void * from krb5module.c:1958 as NULL
taking True path
1960     return NULL;
1961 
1962   memset(&outbuf, 0, sizeof(outbuf));
1963   rc = krb5_mk_priv(ctx, ac, &inbuf, &outbuf, &rdata);
1964   if(rc)
1965     return pk_error(rc);
1966 
1967   retval = PyString_FromStringAndSize(outbuf.data, outbuf.length);
1968   free(outbuf.data);
1969   return retval;
1970 } /* KrbV.AuthContext.mk_priv() */
returning (PyObject*)NULL without setting an exception
found 1 similar trace(s) to this

File: krb5module.c
Function: AuthContext_mk_priv
Error: ob_refcnt of '*tmp' is 1 too high
1932 static PyObject *
1933 AuthContext_mk_priv(PyObject *unself __UNUSED, PyObject *args)
1934 {
1935   PyObject *self, *tmp, *retval;
1936   krb5_data inbuf, outbuf;
1937   krb5_auth_context ac = NULL;
1938   krb5_error_code rc;
1939   krb5_context ctx = NULL;
1940   krb5_replay_data rdata = {0, 0, 0};
1941 
1942   if(!PyArg_ParseTuple(args, "Os#", &self, &inbuf.data, &inbuf.length))
when PyArg_ParseTuple() succeeds
taking False path
1943     return NULL;
1944 
1945   tmp = PyObject_GetAttrString(self, "context");
when PyObject_GetAttrString() succeeds
new ref from call to PyObject_GetAttrString allocated at:   tmp = PyObject_GetAttrString(self, "context");
ob_refcnt is now refs: 1 + N where N >= 0
1946   if(tmp)
taking True path
1947     {
1948       tmp = PyObject_GetAttrString(tmp, "_ctx");
when PyObject_GetAttrString() fails
1949       if(tmp)
taking False path
1950 	ctx = PyCObject_AsVoidPtr(tmp);
1951       if(!ctx)
taking True path
1952 	return NULL;
1953     }
1954   else
1955     return NULL;
1956   tmp = PyObject_GetAttrString(self, "_ac");
1957   if(tmp)
1958     ac = PyCObject_AsVoidPtr(tmp);
1959   if(!ac)
1960     return NULL;
1961 
1962   memset(&outbuf, 0, sizeof(outbuf));
1963   rc = krb5_mk_priv(ctx, ac, &inbuf, &outbuf, &rdata);
1964   if(rc)
1965     return pk_error(rc);
1966 
1967   retval = PyString_FromStringAndSize(outbuf.data, outbuf.length);
1968   free(outbuf.data);
1969   return retval;
1970 } /* KrbV.AuthContext.mk_priv() */
ob_refcnt of '*tmp' is 1 too high
was expecting final ob_refcnt to be N + 0 (for some unknown N)
but final ob_refcnt is N + 1