File: src/_portaudiomodule.c
Function: pa_get_device_info
Error: dereferencing NULL (py_info->devInfo) at src/_portaudiomodule.c:1483
1462 static PyObject *
1463 pa_get_device_info(PyObject *self, PyObject *args)
1464 {
1465   PaDeviceIndex index;
1466   PaDeviceInfo* _info;
1467   _pyAudio_paDeviceInfo* py_info;
1468 
1469   if (!PyArg_ParseTuple(args, "i", &index))
when PyArg_ParseTuple() succeeds
taking False path
1470     return NULL;
1471 
1472   _info = (PaDeviceInfo *) Pa_GetDeviceInfo(index);
1473 
1474   if (!_info) {
when treating unknown const struct PaDeviceInfo * from src/_portaudiomodule.c:1472 as non-NULL
taking False path
1475     PyErr_SetObject(PyExc_IOError,
1476 		    Py_BuildValue("(s,i)",
1477 				  "Invalid device info", paInvalidDevice));
1478     return NULL;
1479   }
1480 
1481   py_info = _create_paDeviceInfo_object();
when _create_paDeviceInfo_object() fails
1482   py_info->devInfo = _info;
dereferencing NULL (py_info->devInfo) at src/_portaudiomodule.c:1483
1483   return (PyObject *) py_info;
1484 }

File: src/_portaudiomodule.c
Function: pa_get_device_info
Error: memory leak: ob_refcnt of new ref from call to Py_BuildValue is 1 too high
1462 static PyObject *
1463 pa_get_device_info(PyObject *self, PyObject *args)
1464 {
1465   PaDeviceIndex index;
1466   PaDeviceInfo* _info;
1467   _pyAudio_paDeviceInfo* py_info;
1468 
1469   if (!PyArg_ParseTuple(args, "i", &index))
when PyArg_ParseTuple() succeeds
taking False path
1470     return NULL;
1471 
1472   _info = (PaDeviceInfo *) Pa_GetDeviceInfo(index);
1473 
1474   if (!_info) {
when treating unknown const struct PaDeviceInfo * from src/_portaudiomodule.c:1472 as NULL
taking True path
1475     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
1476 		    Py_BuildValue("(s,i)",
1477 				  "Invalid device info", paInvalidDevice));
1478     return NULL;
1479   }
1480 
1481   py_info = _create_paDeviceInfo_object();
1482   py_info->devInfo = _info;
1483   return (PyObject *) py_info;
1484 }