File: krb5module.c
Function: AuthContext_genaddrs
Error: ob_refcnt of new ref from call to PyObject_GetAttrString is 1 too high
2074 static PyObject*
2075 AuthContext_genaddrs(PyObject *unself __UNUSED, PyObject *args, PyObject *kw)
2076 {
2077   PyObject *self, *fh, *tmp;
2078   int fd;
2079   krb5_context ctx;
2080   krb5_auth_context ac;
2081   krb5_flags flags = 0;
2082   krb5_error_code rc;
2083   static const char *kwlist[] = {"self", "fh", "flags", NULL};
2084 
2085   if(!PyArg_ParseTupleAndKeywords(args, kw, "OO|i:genaddrs", (char **)kwlist, &self, &fh, &flags))
when PyArg_ParseTupleAndKeywords() succeeds
taking False path
2086     return NULL;
2087 
2088   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
2089   tmp = PyObject_GetAttrString(tmp, "_ctx");
when PyObject_GetAttrString() succeeds
2090   ctx = PyCObject_AsVoidPtr(tmp);
when PyCObject_AsVoidPtr() returns
2091   tmp = PyObject_GetAttrString(self, "_ac");
when PyObject_GetAttrString() succeeds
2092   ac = PyCObject_AsVoidPtr(tmp);
when PyCObject_AsVoidPtr() returns
2093   
2094   fd = obj_to_fd(fh);
2095   if(fd < 0)
when considering range: -0x80000000 <= value <= -1
taking True path
2096     return NULL;
2097 
2098   rc = krb5_auth_con_genaddrs(ctx, ac, fd, flags);
2099   if(rc)
2100     return pk_error(rc);
2101   
2102   Py_INCREF(Py_None);
2103   return Py_None;
2104 } /* KrbV.AuthContext.genaddrs() */
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 41 similar trace(s) to this

File: krb5module.c
Function: AuthContext_genaddrs
Error: returning (PyObject*)NULL without setting an exception
2074 static PyObject*
2075 AuthContext_genaddrs(PyObject *unself __UNUSED, PyObject *args, PyObject *kw)
2076 {
2077   PyObject *self, *fh, *tmp;
2078   int fd;
2079   krb5_context ctx;
2080   krb5_auth_context ac;
2081   krb5_flags flags = 0;
2082   krb5_error_code rc;
2083   static const char *kwlist[] = {"self", "fh", "flags", NULL};
2084 
2085   if(!PyArg_ParseTupleAndKeywords(args, kw, "OO|i:genaddrs", (char **)kwlist, &self, &fh, &flags))
when PyArg_ParseTupleAndKeywords() succeeds
taking False path
2086     return NULL;
2087 
2088   tmp = PyObject_GetAttrString(self, "context");
when PyObject_GetAttrString() succeeds
2089   tmp = PyObject_GetAttrString(tmp, "_ctx");
when PyObject_GetAttrString() succeeds
2090   ctx = PyCObject_AsVoidPtr(tmp);
when PyCObject_AsVoidPtr() returns
2091   tmp = PyObject_GetAttrString(self, "_ac");
when PyObject_GetAttrString() succeeds
2092   ac = PyCObject_AsVoidPtr(tmp);
when PyCObject_AsVoidPtr() returns
2093   
2094   fd = obj_to_fd(fh);
2095   if(fd < 0)
when considering range: -0x80000000 <= value <= -1
taking True path
2096     return NULL;
2097 
2098   rc = krb5_auth_con_genaddrs(ctx, ac, fd, flags);
2099   if(rc)
2100     return pk_error(rc);
2101   
2102   Py_INCREF(Py_None);
2103   return Py_None;
2104 } /* KrbV.AuthContext.genaddrs() */
returning (PyObject*)NULL without setting an exception

File: krb5module.c
Function: AuthContext_genaddrs
Error: ob_refcnt of '*tmp' is 1 too high
2074 static PyObject*
2075 AuthContext_genaddrs(PyObject *unself __UNUSED, PyObject *args, PyObject *kw)
2076 {
2077   PyObject *self, *fh, *tmp;
2078   int fd;
2079   krb5_context ctx;
2080   krb5_auth_context ac;
2081   krb5_flags flags = 0;
2082   krb5_error_code rc;
2083   static const char *kwlist[] = {"self", "fh", "flags", NULL};
2084 
2085   if(!PyArg_ParseTupleAndKeywords(args, kw, "OO|i:genaddrs", (char **)kwlist, &self, &fh, &flags))
when PyArg_ParseTupleAndKeywords() succeeds
taking False path
2086     return NULL;
2087 
2088   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
2089   tmp = PyObject_GetAttrString(tmp, "_ctx");
when PyObject_GetAttrString() fails
2090   ctx = PyCObject_AsVoidPtr(tmp);
when PyCObject_AsVoidPtr() returns
2091   tmp = PyObject_GetAttrString(self, "_ac");
when PyObject_GetAttrString() fails
2092   ac = PyCObject_AsVoidPtr(tmp);
when PyCObject_AsVoidPtr() returns
2093   
2094   fd = obj_to_fd(fh);
2095   if(fd < 0)
when considering range: -0x80000000 <= value <= -1
taking True path
2096     return NULL;
2097 
2098   rc = krb5_auth_con_genaddrs(ctx, ac, fd, flags);
2099   if(rc)
2100     return pk_error(rc);
2101   
2102   Py_INCREF(Py_None);
2103   return Py_None;
2104 } /* KrbV.AuthContext.genaddrs() */
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
found 5 similar trace(s) to this

File: krb5module.c
Function: AuthContext_genaddrs
Error: calling PyObject_GetAttrString with NULL as argument 1 (tmp) at krb5module.c:2089
2074 static PyObject*
2075 AuthContext_genaddrs(PyObject *unself __UNUSED, PyObject *args, PyObject *kw)
2076 {
2077   PyObject *self, *fh, *tmp;
2078   int fd;
2079   krb5_context ctx;
2080   krb5_auth_context ac;
2081   krb5_flags flags = 0;
2082   krb5_error_code rc;
2083   static const char *kwlist[] = {"self", "fh", "flags", NULL};
2084 
2085   if(!PyArg_ParseTupleAndKeywords(args, kw, "OO|i:genaddrs", (char **)kwlist, &self, &fh, &flags))
when PyArg_ParseTupleAndKeywords() succeeds
taking False path
2086     return NULL;
2087 
2088   tmp = PyObject_GetAttrString(self, "context");
when PyObject_GetAttrString() fails
2089   tmp = PyObject_GetAttrString(tmp, "_ctx");
calling PyObject_GetAttrString with NULL as argument 1 (tmp) at krb5module.c:2089
PyObject_GetAttrString() invokes Py_TYPE() on the pointer, thus accessing (NULL)->ob_type
2090   ctx = PyCObject_AsVoidPtr(tmp);
2091   tmp = PyObject_GetAttrString(self, "_ac");
2092   ac = PyCObject_AsVoidPtr(tmp);
2093   
2094   fd = obj_to_fd(fh);
2095   if(fd < 0)
2096     return NULL;
2097 
2098   rc = krb5_auth_con_genaddrs(ctx, ac, fd, flags);
2099   if(rc)
2100     return pk_error(rc);
2101   
2102   Py_INCREF(Py_None);
2103   return Py_None;
2104 } /* KrbV.AuthContext.genaddrs() */