File: cupsmodule.c
Function: cups_require
Error: ob_refcnt of return value is 1 too low
424 static PyObject *
425 cups_require (PyObject *self, PyObject *args)
426 {
427   const char *version = VERSION;
428   const char *required;
429   const char *pver, *preq;
430   char *end;
431   unsigned long nreq, nver;
432 
433   if (!PyArg_ParseTuple (args, "s", &required))
when PyArg_ParseTuple() succeeds
taking False path
434     return NULL;
435 
436   pver = version;
437   preq = required;
438   nreq = strtoul (preq, &end, 0);
439   while (preq != end)
when taking True path
when taking False path
ob_refcnt is now refs: 0 + N where N >= 1
440   {
441     preq = end;
442     if (*preq == '.')
when treating unknown char * * from cupsmodule.c:438 as non-NULL
when considering range: -128 <= value <= 45
taking False path
443       preq++;
444 
445     nver = strtoul (pver, &end, 0);
446     if (pver == end)
when taking False path
447       goto fail;
448     else {
449       pver = end;
450       if (*pver == '.')
when treating unknown char * * from cupsmodule.c:445 as non-NULL
when considering range: -128 <= value <= 45
taking False path
451 	pver++;
452     }
453 
454     if (nver < nreq)
when taking False path
455       goto fail;
456 
457     nreq = strtoul (preq, &end, 0);
458   }
459 
460   return Py_None;
461 fail:
462   PyErr_SetString (PyExc_RuntimeError, "I am version " VERSION);
463   return NULL;
464 }
ob_refcnt of return value is 1 too low
was expecting final ob_refcnt to be N + 1 (for some unknown N)
due to object being referenced by: return value
but final ob_refcnt is N + 0
consider using "Py_RETURN_NONE;"
found 9 similar trace(s) to this