File: _portaudiomodule.c
Function: pa_is_stream_stopped
Error: ob_refcnt of new ref from call to Py_BuildValue is 1 too high
1972 static PyObject *
1973 pa_is_stream_stopped(PyObject *self, PyObject *args)
1974 {
1975   int err;
1976   PyObject *stream_arg;
1977   _pyAudio_Stream *streamObject;
1978 
1979   if (!PyArg_ParseTuple(args, "O!", &_pyAudio_StreamType, &stream_arg))
when PyArg_ParseTuple() succeeds
taking False path
1980     return NULL;
1981 
1982   streamObject = (_pyAudio_Stream *) stream_arg;
1983 
1984   if (!_is_open(streamObject)) {
when considering range: -0x80000000 <= value <= -1
taking False path
1985     PyErr_SetObject(PyExc_IOError,
1986 		    Py_BuildValue("(s,i)",
1987 				  "Stream closed",
1988 				  paBadStreamPtr));
1989     return NULL;
1990   }
1991 
1992   PaStream *stream = streamObject->stream;
1993 
1994   if ((err = Pa_IsStreamStopped(stream)) < 0) {
when considering range: -0x80000000 <= value <= -1
taking True path
1995     _cleanup_Stream_object(streamObject);
1996 
1997 #ifdef VERBOSE
1998     fprintf(stderr, "An error occured while using the portaudio stream\n");
1999     fprintf(stderr, "Error number: %d\n", err);
2000     fprintf(stderr, "Error message: %s\n", Pa_GetErrorText(err));
2001 #endif
2002 
2003     PyErr_SetObject(PyExc_IOError,
when Py_BuildValue() succeeds
calling PyErr_SetObject()
new ref from call to Py_BuildValue allocated at:     PyErr_SetObject(PyExc_IOError,
ob_refcnt is now refs: 1 + N where N >= 0
ob_refcnt is now refs: 1 + N where N >= 1
2004 		    Py_BuildValue("(s,i)",
2005 				  Pa_GetErrorText(err),
2006 				  err));
2007     return NULL;
2008   }
2009 
2010   if (err) {
2011     Py_INCREF(Py_True);
2012     return Py_True;
2013   }
2014 
2015   Py_INCREF(Py_False);
2016   return Py_False;
2017 }
ob_refcnt of new ref from call to Py_BuildValue 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 2 similar trace(s) to this