File: | krb5module.c |
Function: | Principal_itemlen |
Error: | ob_refcnt of new ref from call to PyObject_GetAttrString is 1 too high |
2451 static PyObject*
2452 Principal_itemlen(PyObject *unself __UNUSED, PyObject *args)
2453 {
2454 PyObject *self, *tmp;
2455 krb5_context ctx = NULL;
2456 krb5_principal princ = NULL;
2457
2458 if(!PyArg_ParseTuple(args, "O:__len__", &self))
when PyArg_ParseTuple() succeeds
taking False path
2459 return NULL;
2460
2461 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
2462 if(tmp)
taking True path
2463 {
2464 tmp = PyObject_GetAttrString(tmp, "_ctx");
when PyObject_GetAttrString() succeeds
2465 if(tmp)
taking True path
2466 ctx = PyCObject_AsVoidPtr(tmp);
when PyCObject_AsVoidPtr() returns
2467 }
2468 tmp = PyObject_GetAttrString(self, "_princ");
when PyObject_GetAttrString() succeeds
2469 if(tmp)
taking True path
2470 princ = PyCObject_AsVoidPtr(tmp);
when PyCObject_AsVoidPtr() returns
2471
2472 return PyInt_FromLong(krb5_princ_size(ctx, princ));
when treating unknown void * from krb5module.c:2470 as non-NULL
when PyInt_FromLong() succeeds
2473 } /* KrbV.Principal.__len__() */
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 9 similar trace(s) to this
File: | krb5module.c |
Function: | Principal_itemlen |
Error: | dereferencing NULL (princ->length) at krb5module.c:2472 |
2451 static PyObject*
2452 Principal_itemlen(PyObject *unself __UNUSED, PyObject *args)
2453 {
2454 PyObject *self, *tmp;
2455 krb5_context ctx = NULL;
2456 krb5_principal princ = NULL;
2457
2458 if(!PyArg_ParseTuple(args, "O:__len__", &self))
when PyArg_ParseTuple() succeeds
taking False path
2459 return NULL;
2460
2461 tmp = PyObject_GetAttrString(self, "context");
when PyObject_GetAttrString() succeeds
2462 if(tmp)
taking True path
2463 {
2464 tmp = PyObject_GetAttrString(tmp, "_ctx");
when PyObject_GetAttrString() succeeds
2465 if(tmp)
taking True path
2466 ctx = PyCObject_AsVoidPtr(tmp);
when PyCObject_AsVoidPtr() returns
2467 }
2468 tmp = PyObject_GetAttrString(self, "_princ");
when PyObject_GetAttrString() fails
2469 if(tmp)
taking False path
2470 princ = PyCObject_AsVoidPtr(tmp);
2471
2472 return PyInt_FromLong(krb5_princ_size(ctx, princ));
dereferencing NULL (princ->length) at krb5module.c:2472
found 2 similar trace(s) to this
2473 } /* KrbV.Principal.__len__() */
File: | krb5module.c |
Function: | Principal_itemlen |
Error: | ob_refcnt of '*tmp' is 1 too high |
2451 static PyObject*
2452 Principal_itemlen(PyObject *unself __UNUSED, PyObject *args)
2453 {
2454 PyObject *self, *tmp;
2455 krb5_context ctx = NULL;
2456 krb5_principal princ = NULL;
2457
2458 if(!PyArg_ParseTuple(args, "O:__len__", &self))
when PyArg_ParseTuple() succeeds
taking False path
2459 return NULL;
2460
2461 tmp = PyObject_GetAttrString(self, "context");
when PyObject_GetAttrString() fails
2462 if(tmp)
taking False path
2463 {
2464 tmp = PyObject_GetAttrString(tmp, "_ctx");
2465 if(tmp)
2466 ctx = PyCObject_AsVoidPtr(tmp);
2467 }
2468 tmp = PyObject_GetAttrString(self, "_princ");
when PyObject_GetAttrString() succeeds
new ref from call to PyObject_GetAttrString allocated at: tmp = PyObject_GetAttrString(self, "_princ");
ob_refcnt is now refs: 1 + N where N >= 0
2469 if(tmp)
taking True path
2470 princ = PyCObject_AsVoidPtr(tmp);
when PyCObject_AsVoidPtr() returns
2471
2472 return PyInt_FromLong(krb5_princ_size(ctx, princ));
when treating unknown void * from krb5module.c:2470 as non-NULL
when PyInt_FromLong() succeeds
2473 } /* KrbV.Principal.__len__() */
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 1 similar trace(s) to this