File: _portaudiomodule.c
Function: pa_stop_stream
Error: ob_refcnt of new ref from call to Py_BuildValue is 1 too high
1890 static PyObject *
1891 pa_stop_stream(PyObject *self, PyObject *args)
1892 {
1893 
1894   int err;
1895   PyObject *stream_arg;
1896   _pyAudio_Stream *streamObject;
1897 
1898   if (!PyArg_ParseTuple(args, "O!", &_pyAudio_StreamType, &stream_arg))
when PyArg_ParseTuple() succeeds
taking False path
1899     return NULL;
1900 
1901   streamObject = (_pyAudio_Stream *) stream_arg;
1902 
1903   if (!_is_open(streamObject)) {
when considering range: -0x80000000 <= value <= -1
taking False path
1904     PyErr_SetString(PyExc_IOError, "Stream not open");
1905     return NULL;
1906   }
1907 
1908   PaStream *stream = streamObject->stream;
1909 
1910   if ( ((err = Pa_StopStream(stream)) != paNoError)  &&
when considering range: -0x80000000 <= value <= -1
taking True path
when considering range: -0x80000000 <= value <= -9984
taking True path
1911        (err != paStreamIsStopped)) {
1912 
1913     _cleanup_Stream_object(streamObject);
1914 
1915 #ifdef VERBOSE
1916     fprintf(stderr, "An error occured while using the portaudio stream\n");
1917     fprintf(stderr, "Error number: %d\n", err);
1918     fprintf(stderr, "Error message: %s\n", Pa_GetErrorText(err));
1919 #endif
1920 
1921     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
1922 		    Py_BuildValue("(s,i)",
1923 				  Pa_GetErrorText(err),
1924 				  err));
1925     return NULL;
1926   }
1927 
1928   Py_INCREF(Py_None);
1929   return Py_None;
1930 }
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 5 similar trace(s) to this