File: | krb5module.c |
Function: | CCache_init_creds_keytab |
Error: | ob_refcnt of '*conobj' is 1 too high |
2971 static PyObject*
2972 CCache_init_creds_keytab(PyObject *unself __UNUSED, PyObject *args, PyObject *kw)
2973 {
2974 static const char *kwlist[] = {"self", "keytab", "principal", NULL};
2975 PyObject *self, *keytab = NULL, *principal = NULL, *conobj = NULL, *tmp;
2976 krb5_ccache ccache = NULL;
2977 krb5_context ctx = NULL;
2978 krb5_keytab kt = NULL;
2979 krb5_principal princ = NULL;
2980 krb5_error_code rc;
2981 krb5_creds my_creds;
2982 krb5_get_init_creds_opt options;
2983
2984 if(!PyArg_ParseTupleAndKeywords(args, kw, "OO|O:init_creds_keytab", (char **)kwlist,
when PyArg_ParseTupleAndKeywords() succeeds
taking False path
2985 &self, &keytab, &principal))
2986 return NULL;
2987
2988 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
2989 if(tmp)
taking True path
2990 {
2991 tmp = PyObject_GetAttrString(tmp, "_ctx");
when PyObject_GetAttrString() succeeds
2992 if(tmp)
taking True path
2993 ctx = PyCObject_AsVoidPtr(tmp);
when PyCObject_AsVoidPtr() returns
2994 }
2995 tmp = PyObject_GetAttrString(self, "_ccache");
when PyObject_GetAttrString() fails
2996 if(tmp)
taking False path
2997 ccache = PyCObject_AsVoidPtr(tmp);
2998 tmp = PyObject_GetAttrString(keytab, "_keytab");
when PyObject_GetAttrString() fails
2999 if(tmp)
taking False path
3000 kt = PyCObject_AsVoidPtr(tmp);
3001 if(principal == Py_None)
taking False path
3002 principal = NULL;
3003 if(!principal)
taking False path
3004 {
3005 tmp = Py_BuildValue("(O)", self);
3006 principal = CCache_principal(NULL, tmp, NULL);
3007 Py_DECREF(tmp);
3008 }
3009 tmp = PyObject_GetAttrString(principal, "_princ");
when PyObject_GetAttrString() succeeds
3010 if(tmp)
taking True path
3011 princ = PyCObject_AsVoidPtr(tmp);
when PyCObject_AsVoidPtr() returns
3012 else
3013 return NULL;
3014 memset(&my_creds, 0, sizeof(my_creds));
3015
3016 krb5_get_init_creds_opt_init(&options);
3017 rc = krb5_get_init_creds_keytab(ctx, &my_creds, princ, kt, 0, NULL, &options);
3018 if(rc)
when considering range: -0x80000000 <= value <= -1
taking True path
3019 return pk_error(rc);
when pk_error() succeeds
3020
3021 rc = krb5_cc_store_cred(ctx, ccache, &my_creds);
3022 if(rc)
3023 return pk_error(rc);
3024
3025 krb5_free_cred_contents(ctx, &my_creds);
3026
3027 Py_INCREF(Py_None);
3028 return Py_None;
3029 } /* KrbV.CCache.init_creds_keytab() */
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 30 similar trace(s) to this
File: | krb5module.c |
Function: | CCache_init_creds_keytab |
Error: | ob_refcnt of new ref from call to PyObject_GetAttrString is 1 too high |
2971 static PyObject*
2972 CCache_init_creds_keytab(PyObject *unself __UNUSED, PyObject *args, PyObject *kw)
2973 {
2974 static const char *kwlist[] = {"self", "keytab", "principal", NULL};
2975 PyObject *self, *keytab = NULL, *principal = NULL, *conobj = NULL, *tmp;
2976 krb5_ccache ccache = NULL;
2977 krb5_context ctx = NULL;
2978 krb5_keytab kt = NULL;
2979 krb5_principal princ = NULL;
2980 krb5_error_code rc;
2981 krb5_creds my_creds;
2982 krb5_get_init_creds_opt options;
2983
2984 if(!PyArg_ParseTupleAndKeywords(args, kw, "OO|O:init_creds_keytab", (char **)kwlist,
when PyArg_ParseTupleAndKeywords() succeeds
taking False path
2985 &self, &keytab, &principal))
2986 return NULL;
2987
2988 conobj = tmp = PyObject_GetAttrString(self, "context");
when PyObject_GetAttrString() succeeds
2989 if(tmp)
taking True path
2990 {
2991 tmp = PyObject_GetAttrString(tmp, "_ctx");
when PyObject_GetAttrString() succeeds
new ref from call to PyObject_GetAttrString allocated at: tmp = PyObject_GetAttrString(tmp, "_ctx");
ob_refcnt is now refs: 1 + N where N >= 0
2992 if(tmp)
taking True path
2993 ctx = PyCObject_AsVoidPtr(tmp);
when PyCObject_AsVoidPtr() returns
2994 }
2995 tmp = PyObject_GetAttrString(self, "_ccache");
when PyObject_GetAttrString() fails
2996 if(tmp)
taking False path
2997 ccache = PyCObject_AsVoidPtr(tmp);
2998 tmp = PyObject_GetAttrString(keytab, "_keytab");
when PyObject_GetAttrString() fails
2999 if(tmp)
taking False path
3000 kt = PyCObject_AsVoidPtr(tmp);
3001 if(principal == Py_None)
taking False path
3002 principal = NULL;
3003 if(!principal)
taking False path
3004 {
3005 tmp = Py_BuildValue("(O)", self);
3006 principal = CCache_principal(NULL, tmp, NULL);
3007 Py_DECREF(tmp);
3008 }
3009 tmp = PyObject_GetAttrString(principal, "_princ");
when PyObject_GetAttrString() succeeds
3010 if(tmp)
taking True path
3011 princ = PyCObject_AsVoidPtr(tmp);
when PyCObject_AsVoidPtr() returns
3012 else
3013 return NULL;
3014 memset(&my_creds, 0, sizeof(my_creds));
3015
3016 krb5_get_init_creds_opt_init(&options);
3017 rc = krb5_get_init_creds_keytab(ctx, &my_creds, princ, kt, 0, NULL, &options);
3018 if(rc)
when considering range: -0x80000000 <= value <= -1
taking True path
3019 return pk_error(rc);
when pk_error() succeeds
3020
3021 rc = krb5_cc_store_cred(ctx, ccache, &my_creds);
3022 if(rc)
3023 return pk_error(rc);
3024
3025 krb5_free_cred_contents(ctx, &my_creds);
3026
3027 Py_INCREF(Py_None);
3028 return Py_None;
3029 } /* KrbV.CCache.init_creds_keytab() */
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 98 similar trace(s) to this