File: src/_portaudiomodule.c
Function: pa_get_device_count
Error: memory leak: ob_refcnt of new ref from call to Py_BuildValue is 1 too high
1378 static PyObject *
1379 pa_get_device_count(PyObject *self, PyObject *args)
1380 {
1381   PaDeviceIndex count;
1382 
1383   if (!PyArg_ParseTuple(args, ""))
when PyArg_ParseTuple() succeeds
taking False path
1384     return NULL;
1385 
1386   count = Pa_GetDeviceCount();
1387   if (count < 0) {
when considering range: -0x80000000 <= value <= -1
taking True path
1388 
1389 #ifdef VERBOSE
1390     fprintf(stderr, "An error occured while using the portaudio stream\n");
1391     fprintf(stderr, "Error number: %d\n", count);
1392     fprintf(stderr, "Error message: %s\n", Pa_GetErrorText(count));
1393 #endif
1394 
1395     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
1396 		    Py_BuildValue("(s,i)",
1397 				  Pa_GetErrorText(count), count));
1398     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
1399   }
1400 
1401   return PyLong_FromLong(count);
1402 }