File: src/_portaudiomodule.c
Function: pa_get_default_host_api
Error: memory leak: ob_refcnt of new ref from call to Py_BuildValue is 1 too high
1264 static PyObject *
1265 pa_get_default_host_api(PyObject *self, PyObject *args)
1266 {
1267   PaHostApiIndex index;
1268 
1269   if (!PyArg_ParseTuple(args, ""))
when PyArg_ParseTuple() succeeds
taking False path
1270     return NULL;
1271 
1272   index = Pa_GetDefaultHostApi();
1273 
1274   if (index < 0) {
when considering range: -0x80000000 <= value <= -1
taking True path
1275 
1276 #ifdef VERBOSE
1277     fprintf(stderr, "An error occured while using the portaudio stream\n");
1278     fprintf(stderr, "Error number: %d\n", index);
1279     fprintf(stderr, "Error message: %s\n", Pa_GetErrorText(index));
1280 #endif
1281 
1282     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
1283 		    Py_BuildValue("(s,i)",
1284 				  Pa_GetErrorText(index), index));
1285     return NULL;
memory leak: ob_refcnt of new ref from call to Py_BuildValue is 1 too high
was expecting final owned ob_refcnt of new ref from call to Py_BuildValue to be 0 since nothing references it but final ob_refcnt is refs: 1 owned, 1 borrowed
1286   }
1287 
1288   return PyLong_FromLong(index);
1289 }