File: | krb5module.c |
Function: | CCache_initialize |
Error: | ob_refcnt of new ref from call to PyObject_GetAttrString is 1 too high |
3048 static PyObject*
3049 CCache_initialize(PyObject *unself __UNUSED, PyObject *args, PyObject *kw)
3050 {
3051 static const char *kwlist[] = {"self", "principal", NULL};
3052 PyObject *self, *principal = NULL, *conobj = NULL, *tmp;
3053 krb5_ccache ccache = NULL;
3054 krb5_context ctx = NULL;
3055 krb5_principal princ = NULL;
3056 krb5_error_code rc;
3057
3058 if(!PyArg_ParseTupleAndKeywords(args, kw, "OO:initialize", (char **)kwlist,
when PyArg_ParseTupleAndKeywords() succeeds
taking False path
3059 &self, &principal))
3060 return NULL;
3061
3062 conobj = tmp = PyObject_GetAttrString(self, "context");
when PyObject_GetAttrString() fails
3063 if(tmp)
taking False path
3064 {
3065 tmp = PyObject_GetAttrString(tmp, "_ctx");
3066 if(tmp)
3067 ctx = PyCObject_AsVoidPtr(tmp);
3068 }
3069 tmp = PyObject_GetAttrString(self, "_ccache");
when PyObject_GetAttrString() succeeds
new ref from call to PyObject_GetAttrString allocated at: tmp = PyObject_GetAttrString(self, "_ccache");
ob_refcnt is now refs: 1 + N where N >= 0
3070 if(tmp)
taking True path
3071 ccache = PyCObject_AsVoidPtr(tmp);
when PyCObject_AsVoidPtr() returns
3072 if(principal == Py_None)
taking False path
3073 principal = NULL;
3074 if(!principal)
taking False path
3075 {
3076 PyErr_SetNone(PyExc_ValueError);
3077 return NULL;
3078 }
3079 tmp = PyObject_GetAttrString(principal, "_princ");
when PyObject_GetAttrString() succeeds
3080 if(tmp)
taking True path
3081 princ = PyCObject_AsVoidPtr(tmp);
when PyCObject_AsVoidPtr() returns
3082 else
3083 return NULL;
3084
3085 rc = krb5_cc_initialize(ctx, ccache, princ);
3086 if(rc)
when considering range: -0x80000000 <= value <= -1
taking True path
3087 return pk_error(rc);
when pk_error() succeeds
3088
3089 Py_INCREF(Py_None);
3090 return Py_None;
3091 }
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 53 similar trace(s) to this
File: | krb5module.c |
Function: | CCache_initialize |
Error: | ob_refcnt of '*tmp' is 1 too high |
3048 static PyObject*
3049 CCache_initialize(PyObject *unself __UNUSED, PyObject *args, PyObject *kw)
3050 {
3051 static const char *kwlist[] = {"self", "principal", NULL};
3052 PyObject *self, *principal = NULL, *conobj = NULL, *tmp;
3053 krb5_ccache ccache = NULL;
3054 krb5_context ctx = NULL;
3055 krb5_principal princ = NULL;
3056 krb5_error_code rc;
3057
3058 if(!PyArg_ParseTupleAndKeywords(args, kw, "OO:initialize", (char **)kwlist,
when PyArg_ParseTupleAndKeywords() succeeds
taking False path
3059 &self, &principal))
3060 return NULL;
3061
3062 conobj = tmp = PyObject_GetAttrString(self, "context");
when PyObject_GetAttrString() fails
3063 if(tmp)
taking False path
3064 {
3065 tmp = PyObject_GetAttrString(tmp, "_ctx");
3066 if(tmp)
3067 ctx = PyCObject_AsVoidPtr(tmp);
3068 }
3069 tmp = PyObject_GetAttrString(self, "_ccache");
when PyObject_GetAttrString() succeeds
new ref from call to PyObject_GetAttrString allocated at: tmp = PyObject_GetAttrString(self, "_ccache");
ob_refcnt is now refs: 1 + N where N >= 0
3070 if(tmp)
taking True path
3071 ccache = PyCObject_AsVoidPtr(tmp);
when PyCObject_AsVoidPtr() returns
3072 if(principal == Py_None)
taking False path
3073 principal = NULL;
3074 if(!principal)
taking False path
3075 {
3076 PyErr_SetNone(PyExc_ValueError);
3077 return NULL;
3078 }
3079 tmp = PyObject_GetAttrString(principal, "_princ");
when PyObject_GetAttrString() fails
3080 if(tmp)
taking False path
3081 princ = PyCObject_AsVoidPtr(tmp);
3082 else
3083 return NULL;
3084
3085 rc = krb5_cc_initialize(ctx, ccache, princ);
3086 if(rc)
3087 return pk_error(rc);
3088
3089 Py_INCREF(Py_None);
3090 return Py_None;
3091 }
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
File: | krb5module.c |
Function: | CCache_initialize |
Error: | ob_refcnt of '*conobj' is 1 too high |
3048 static PyObject*
3049 CCache_initialize(PyObject *unself __UNUSED, PyObject *args, PyObject *kw)
3050 {
3051 static const char *kwlist[] = {"self", "principal", NULL};
3052 PyObject *self, *principal = NULL, *conobj = NULL, *tmp;
3053 krb5_ccache ccache = NULL;
3054 krb5_context ctx = NULL;
3055 krb5_principal princ = NULL;
3056 krb5_error_code rc;
3057
3058 if(!PyArg_ParseTupleAndKeywords(args, kw, "OO:initialize", (char **)kwlist,
when PyArg_ParseTupleAndKeywords() succeeds
taking False path
3059 &self, &principal))
3060 return NULL;
3061
3062 conobj = tmp = PyObject_GetAttrString(self, "context");
when PyObject_GetAttrString() succeeds
new ref from call to PyObject_GetAttrString allocated at: conobj = tmp = PyObject_GetAttrString(self, "context");
ob_refcnt is now refs: 1 + N where N >= 0
3063 if(tmp)
taking True path
3064 {
3065 tmp = PyObject_GetAttrString(tmp, "_ctx");
when PyObject_GetAttrString() succeeds
3066 if(tmp)
taking True path
3067 ctx = PyCObject_AsVoidPtr(tmp);
when PyCObject_AsVoidPtr() returns
3068 }
3069 tmp = PyObject_GetAttrString(self, "_ccache");
when PyObject_GetAttrString() succeeds
3070 if(tmp)
taking True path
3071 ccache = PyCObject_AsVoidPtr(tmp);
when PyCObject_AsVoidPtr() returns
3072 if(principal == Py_None)
taking False path
3073 principal = NULL;
3074 if(!principal)
taking False path
3075 {
3076 PyErr_SetNone(PyExc_ValueError);
3077 return NULL;
3078 }
3079 tmp = PyObject_GetAttrString(principal, "_princ");
when PyObject_GetAttrString() succeeds
3080 if(tmp)
taking True path
3081 princ = PyCObject_AsVoidPtr(tmp);
when PyCObject_AsVoidPtr() returns
3082 else
3083 return NULL;
3084
3085 rc = krb5_cc_initialize(ctx, ccache, princ);
3086 if(rc)
when considering range: -0x80000000 <= value <= -1
taking True path
3087 return pk_error(rc);
when pk_error() succeeds
3088
3089 Py_INCREF(Py_None);
3090 return Py_None;
3091 }
ob_refcnt of '*conobj' 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 23 similar trace(s) to this