File: krb5module.c
Function: Principal_repr
Error: ob_refcnt of '*tmp' is 1 too high
2531 static PyObject*
2532 Principal_repr(PyObject *unself __UNUSED, PyObject *args)
2533 {
2534   PyObject *self, *tmp, *retval;
2535   krb5_context ctx = NULL;
2536   krb5_principal princ = NULL;
2537   char *outname, *outbuf;
2538   krb5_error_code rc;
2539 
2540   if(!PyArg_ParseTuple(args, "O:__repr__", &self))
when PyArg_ParseTuple() succeeds
taking False path
2541     return NULL;
2542 
2543   tmp = PyObject_GetAttrString(self, "context");
when PyObject_GetAttrString() fails
2544   if(tmp)
taking False path
2545     {
2546       tmp = PyObject_GetAttrString(tmp, "_ctx");
2547       if(tmp)
2548 	ctx = PyCObject_AsVoidPtr(tmp);
2549     }
2550   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
2551   if(tmp)
taking True path
2552     princ = PyCObject_AsVoidPtr(tmp);
when PyCObject_AsVoidPtr() returns
2553 
2554   rc = krb5_unparse_name(ctx, princ, &outname);
2555   if(rc)
when considering range: -0x80000000 <= value <= -1
taking True path
2556     return pk_error(rc);
when pk_error() succeeds
2557   outbuf = alloca(strlen(outname) + strlen("<krb5.Principal instance at 0x1234567890123456: >") + 1);
2558   sprintf(outbuf, "<krb5.Principal instance at %p: %s>", self, outname);
2559 
2560   retval = PyString_FromString(outbuf);
2561   free(outname);
2562   return retval;
2563 } /* KrbV.Principal.__repr__() */
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 11 similar trace(s) to this

File: krb5module.c
Function: Principal_repr
Error: ob_refcnt of new ref from call to PyObject_GetAttrString is 1 too high
2531 static PyObject*
2532 Principal_repr(PyObject *unself __UNUSED, PyObject *args)
2533 {
2534   PyObject *self, *tmp, *retval;
2535   krb5_context ctx = NULL;
2536   krb5_principal princ = NULL;
2537   char *outname, *outbuf;
2538   krb5_error_code rc;
2539 
2540   if(!PyArg_ParseTuple(args, "O:__repr__", &self))
when PyArg_ParseTuple() succeeds
taking False path
2541     return NULL;
2542 
2543   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
2544   if(tmp)
taking True path
2545     {
2546       tmp = PyObject_GetAttrString(tmp, "_ctx");
when PyObject_GetAttrString() succeeds
2547       if(tmp)
taking True path
2548 	ctx = PyCObject_AsVoidPtr(tmp);
when PyCObject_AsVoidPtr() returns
2549     }
2550   tmp = PyObject_GetAttrString(self, "_princ");
when PyObject_GetAttrString() succeeds
2551   if(tmp)
taking True path
2552     princ = PyCObject_AsVoidPtr(tmp);
when PyCObject_AsVoidPtr() returns
2553 
2554   rc = krb5_unparse_name(ctx, princ, &outname);
2555   if(rc)
when considering range: -0x80000000 <= value <= -1
taking True path
2556     return pk_error(rc);
when pk_error() succeeds
2557   outbuf = alloca(strlen(outname) + strlen("<krb5.Principal instance at 0x1234567890123456: >") + 1);
2558   sprintf(outbuf, "<krb5.Principal instance at %p: %s>", self, outname);
2559 
2560   retval = PyString_FromString(outbuf);
2561   free(outname);
2562   return retval;
2563 } /* KrbV.Principal.__repr__() */
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