File: src/_portaudiomodule.c
Function: pa_get_stream_cpu_load
Error: memory leak: ob_refcnt of new ref from call to Py_BuildValue is 1 too high
2307 static PyObject *
2308 pa_get_stream_cpu_load(PyObject *self, PyObject *args)
2309 {
2310   PyObject *stream_arg;
2311   _pyAudio_Stream *streamObject;
2312   PaStream *stream;
2313 
2314   if (!PyArg_ParseTuple(args, "O!", &_pyAudio_StreamType, &stream_arg))
when PyArg_ParseTuple() succeeds
taking False path
2315     return NULL;
2316 
2317   streamObject = (_pyAudio_Stream *) stream_arg;
2318 
2319   if (!_is_open(streamObject)) {
when considering value == (int)0 from src/_portaudiomodule.c:2319
taking True path
2320     PyErr_SetObject(PyExc_IOError,
when Py_BuildValue() succeeds
calling PyErr_SetObject()
new ref from call to Py_BuildValue was allocated at:     PyErr_SetObject(PyExc_IOError,
ob_refcnt is now refs: 1 owned
ob_refcnt is now refs: 1 owned, 1 borrowed
2321 		    Py_BuildValue("(s,i)",
2322 				  "Stream closed",
2323 				  paBadStreamPtr));
2324     return NULL;
2325   }
2326 
2327   stream = streamObject->stream;
2328   return PyFloat_FromDouble(Pa_GetStreamCpuLoad(stream));
2329 }