File: | krb5module.c |
Function: | AuthContext_rd_priv |
Error: | ob_refcnt of new ref from call to PyObject_GetAttrString is 1 too high |
1864 static PyObject *
1865 AuthContext_rd_priv(PyObject *unself __UNUSED, PyObject *args)
1866 {
1867 PyObject *self, *tmp, *retval;
1868 krb5_data inbuf, outbuf;
1869 krb5_auth_context ac = NULL;
1870 krb5_error_code rc;
1871 krb5_context ctx = NULL;
1872 krb5_replay_data rdata = {0, 0, 0};
1873
1874 if(!PyArg_ParseTuple(args, "Os#", &self, &inbuf.data, &inbuf.length))
when PyArg_ParseTuple() succeeds
taking False path
1875 return NULL;
1876
1877 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
1878 if(tmp)
taking True path
1879 {
1880 tmp = PyObject_GetAttrString(tmp, "_ctx");
when PyObject_GetAttrString() succeeds
1881 if(tmp)
taking True path
1882 ctx = PyCObject_AsVoidPtr(tmp);
when PyCObject_AsVoidPtr() returns
1883 if(!ctx)
when treating unknown void * from krb5module.c:1882 as non-NULL
taking False path
1884 return NULL;
1885 }
1886 else
1887 return NULL;
1888 tmp = PyObject_GetAttrString(self, "_ac");
when PyObject_GetAttrString() succeeds
1889 if(tmp)
taking True path
1890 ac = PyCObject_AsVoidPtr(tmp);
when PyCObject_AsVoidPtr() returns
1891 if(!ac)
when treating unknown void * from krb5module.c:1890 as non-NULL
taking False path
1892 return NULL;
1893
1894 memset(&outbuf, 0, sizeof(outbuf));
1895 rc = krb5_rd_priv(ctx, ac, &inbuf, &outbuf, &rdata);
1896 if(rc)
when considering range: -0x80000000 <= value <= -1
taking True path
1897 return pk_error(rc);
when pk_error() succeeds
1898
1899 retval = PyString_FromStringAndSize(outbuf.data, outbuf.length);
1900 free(outbuf.data);
1901 return retval;
1902 } /* KrbV.AuthContext.rd_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_rd_priv |
Error: | returning (PyObject*)NULL without setting an exception |
1864 static PyObject *
1865 AuthContext_rd_priv(PyObject *unself __UNUSED, PyObject *args)
1866 {
1867 PyObject *self, *tmp, *retval;
1868 krb5_data inbuf, outbuf;
1869 krb5_auth_context ac = NULL;
1870 krb5_error_code rc;
1871 krb5_context ctx = NULL;
1872 krb5_replay_data rdata = {0, 0, 0};
1873
1874 if(!PyArg_ParseTuple(args, "Os#", &self, &inbuf.data, &inbuf.length))
when PyArg_ParseTuple() succeeds
taking False path
1875 return NULL;
1876
1877 tmp = PyObject_GetAttrString(self, "context");
when PyObject_GetAttrString() succeeds
1878 if(tmp)
taking True path
1879 {
1880 tmp = PyObject_GetAttrString(tmp, "_ctx");
when PyObject_GetAttrString() succeeds
1881 if(tmp)
taking True path
1882 ctx = PyCObject_AsVoidPtr(tmp);
when PyCObject_AsVoidPtr() returns
1883 if(!ctx)
when treating unknown void * from krb5module.c:1882 as non-NULL
taking False path
1884 return NULL;
1885 }
1886 else
1887 return NULL;
1888 tmp = PyObject_GetAttrString(self, "_ac");
when PyObject_GetAttrString() succeeds
1889 if(tmp)
taking True path
1890 ac = PyCObject_AsVoidPtr(tmp);
when PyCObject_AsVoidPtr() returns
1891 if(!ac)
when treating unknown void * from krb5module.c:1890 as NULL
taking True path
1892 return NULL;
1893
1894 memset(&outbuf, 0, sizeof(outbuf));
1895 rc = krb5_rd_priv(ctx, ac, &inbuf, &outbuf, &rdata);
1896 if(rc)
1897 return pk_error(rc);
1898
1899 retval = PyString_FromStringAndSize(outbuf.data, outbuf.length);
1900 free(outbuf.data);
1901 return retval;
1902 } /* KrbV.AuthContext.rd_priv() */
returning (PyObject*)NULL without setting an exception
found 1 similar trace(s) to this
File: | krb5module.c |
Function: | AuthContext_rd_priv |
Error: | ob_refcnt of '*tmp' is 1 too high |
1864 static PyObject *
1865 AuthContext_rd_priv(PyObject *unself __UNUSED, PyObject *args)
1866 {
1867 PyObject *self, *tmp, *retval;
1868 krb5_data inbuf, outbuf;
1869 krb5_auth_context ac = NULL;
1870 krb5_error_code rc;
1871 krb5_context ctx = NULL;
1872 krb5_replay_data rdata = {0, 0, 0};
1873
1874 if(!PyArg_ParseTuple(args, "Os#", &self, &inbuf.data, &inbuf.length))
when PyArg_ParseTuple() succeeds
taking False path
1875 return NULL;
1876
1877 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
1878 if(tmp)
taking True path
1879 {
1880 tmp = PyObject_GetAttrString(tmp, "_ctx");
when PyObject_GetAttrString() fails
1881 if(tmp)
taking False path
1882 ctx = PyCObject_AsVoidPtr(tmp);
1883 if(!ctx)
taking True path
1884 return NULL;
1885 }
1886 else
1887 return NULL;
1888 tmp = PyObject_GetAttrString(self, "_ac");
1889 if(tmp)
1890 ac = PyCObject_AsVoidPtr(tmp);
1891 if(!ac)
1892 return NULL;
1893
1894 memset(&outbuf, 0, sizeof(outbuf));
1895 rc = krb5_rd_priv(ctx, ac, &inbuf, &outbuf, &rdata);
1896 if(rc)
1897 return pk_error(rc);
1898
1899 retval = PyString_FromStringAndSize(outbuf.data, outbuf.length);
1900 free(outbuf.data);
1901 return retval;
1902 } /* KrbV.AuthContext.rd_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