File: src/_portaudiomodule.c
Function: pa_host_api_type_id_to_host_api_index
Error: memory leak: ob_refcnt of new ref from call to Py_BuildValue is 1 too high
1291 static PyObject *
1292 pa_host_api_type_id_to_host_api_index(PyObject *self, PyObject *args)
1293 {
1294   PaHostApiTypeId typeid;
1295   PaHostApiIndex index;
1296 
1297   if (!PyArg_ParseTuple(args, "i", &typeid))
when PyArg_ParseTuple() succeeds
taking False path
1298     return NULL;
1299 
1300   index = Pa_HostApiTypeIdToHostApiIndex(typeid);
1301 
1302   if (index < 0) {
when considering range: -0x80000000 <= value <= -1
taking True path
1303 
1304 #ifdef VERBOSE
1305     fprintf(stderr, "An error occured while using the portaudio stream\n");
1306     fprintf(stderr, "Error number: %d\n", index);
1307     fprintf(stderr, "Error message: %s\n", Pa_GetErrorText(index));
1308 #endif
1309 
1310     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
1311 		    Py_BuildValue("(s,i)",
1312 				  Pa_GetErrorText(index), index));
1313     return NULL;
1314   }
1315 
1316   return PyLong_FromLong(index);
1317 }