File: src/_portaudiomodule.c
Function: pa_start_stream
Error: memory leak: ob_refcnt of new ref from call to Py_BuildValue is 1 too high
2045 static PyObject *
2046 pa_start_stream(PyObject *self, PyObject *args)
2047 {
2048   int err;
2049   PyObject *stream_arg;
2050   _pyAudio_Stream *streamObject;
2051   PaStream *stream;
2052 
2053   if (!PyArg_ParseTuple(args, "O!", &_pyAudio_StreamType, &stream_arg))
when PyArg_ParseTuple() succeeds
taking False path
2054     return NULL;
2055 
2056   streamObject = (_pyAudio_Stream *) stream_arg;
2057 
2058   if (!_is_open(streamObject)) {
when considering range: -0x80000000 <= value <= -1
taking False path
2059     PyErr_SetObject(PyExc_IOError,
2060 		    Py_BuildValue("(s,i)",
2061 				  "Stream closed",
2062 				  paBadStreamPtr));
2063     return NULL;
2064   }
2065 
2066   stream = streamObject->stream;
2067 
2068   if ( ((err = Pa_StartStream(stream)) != paNoError) &&
when considering range: -0x80000000 <= value <= -1
taking True path
when considering range: -0x80000000 <= value <= -9983
taking True path
2069        (err != paStreamIsNotStopped)) {
2070     _cleanup_Stream_object(streamObject);
2071 
2072 #ifdef VERBOSE
2073     fprintf(stderr, "An error occured while using the portaudio stream\n");
2074     fprintf(stderr, "Error number: %d\n", err);
2075     fprintf(stderr, "Error message: %s\n", Pa_GetErrorText(err));
2076 #endif
2077 
2078     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
2079 		    Py_BuildValue("(s,i)",
2080 				  Pa_GetErrorText(err),
2081 				  err));
2082     return NULL;
2083   }
2084 
2085   Py_INCREF(Py_None);
2086   return Py_None;
2087 }