File: | _portaudiomodule.c |
Function: | pa_get_host_api_info |
Error: | dereferencing NULL (py_info->apiInfo) at _portaudiomodule.c:1352 |
1329 static PyObject *
1330 pa_get_host_api_info(PyObject *self, PyObject *args)
1331 {
1332 PaHostApiIndex index;
1333 PaHostApiInfo* _info;
1334 _pyAudio_paHostApiInfo* py_info;
1335
1336 if (!PyArg_ParseTuple(args, "i", &index))
when PyArg_ParseTuple() succeeds
taking False path
1337 return NULL;
1338
1339 _info = (PaHostApiInfo *) Pa_GetHostApiInfo(index);
1340
1341 if (!_info) {
when treating unknown const struct PaHostApiInfo * from _portaudiomodule.c:1339 as non-NULL
taking False path
1342 PyErr_SetObject(PyExc_IOError,
1343 Py_BuildValue("(s,i)",
1344 "Invalid host api info",
1345 paInvalidHostApi));
1346 return NULL;
1347 }
1348
1349 py_info = _create_paHostApiInfo_object();
when _create_paHostApiInfo_object() fails
1350 py_info->apiInfo = _info;
dereferencing NULL (py_info->apiInfo) at _portaudiomodule.c:1352
1351
1352 return (PyObject *) py_info;
1353 }
File: | _portaudiomodule.c |
Function: | pa_get_host_api_info |
Error: | ob_refcnt of new ref from call to Py_BuildValue is 1 too high |
1329 static PyObject *
1330 pa_get_host_api_info(PyObject *self, PyObject *args)
1331 {
1332 PaHostApiIndex index;
1333 PaHostApiInfo* _info;
1334 _pyAudio_paHostApiInfo* py_info;
1335
1336 if (!PyArg_ParseTuple(args, "i", &index))
when PyArg_ParseTuple() succeeds
taking False path
1337 return NULL;
1338
1339 _info = (PaHostApiInfo *) Pa_GetHostApiInfo(index);
1340
1341 if (!_info) {
when treating unknown const struct PaHostApiInfo * from _portaudiomodule.c:1339 as NULL
taking True path
1342 PyErr_SetObject(PyExc_IOError,
when Py_BuildValue() succeeds
calling PyErr_SetObject()
new ref from call to Py_BuildValue allocated at: PyErr_SetObject(PyExc_IOError,
ob_refcnt is now refs: 1 + N where N >= 0
ob_refcnt is now refs: 1 + N where N >= 1
1343 Py_BuildValue("(s,i)",
1344 "Invalid host api info",
1345 paInvalidHostApi));
1346 return NULL;
1347 }
1348
1349 py_info = _create_paHostApiInfo_object();
1350 py_info->apiInfo = _info;
1351
1352 return (PyObject *) py_info;
1353 }
ob_refcnt of new ref from call to Py_BuildValue is 1 too high
was expecting final ob_refcnt to be N + 0 (for some unknown N)
but final ob_refcnt is N + 1