File: | src/_portaudiomodule.c |
Function: | pa_get_host_api_info |
Error: | dereferencing NULL (py_info->apiInfo) at src/_portaudiomodule.c:1371 |
1348 static PyObject *
1349 pa_get_host_api_info(PyObject *self, PyObject *args)
1350 {
1351 PaHostApiIndex index;
1352 PaHostApiInfo* _info;
1353 _pyAudio_paHostApiInfo* py_info;
1354
1355 if (!PyArg_ParseTuple(args, "i", &index))
when PyArg_ParseTuple() succeeds
taking False path
1356 return NULL;
1357
1358 _info = (PaHostApiInfo *) Pa_GetHostApiInfo(index);
1359
1360 if (!_info) {
when treating unknown const struct PaHostApiInfo * from src/_portaudiomodule.c:1358 as non-NULL
taking False path
1361 PyErr_SetObject(PyExc_IOError,
1362 Py_BuildValue("(s,i)",
1363 "Invalid host api info",
1364 paInvalidHostApi));
1365 return NULL;
1366 }
1367
1368 py_info = _create_paHostApiInfo_object();
when _create_paHostApiInfo_object() fails
1369 py_info->apiInfo = _info;
dereferencing NULL (py_info->apiInfo) at src/_portaudiomodule.c:1371
1370
1371 return (PyObject *) py_info;
1372 }
File: | src/_portaudiomodule.c |
Function: | pa_get_host_api_info |
Error: | memory leak: ob_refcnt of new ref from call to Py_BuildValue is 1 too high |
1348 static PyObject *
1349 pa_get_host_api_info(PyObject *self, PyObject *args)
1350 {
1351 PaHostApiIndex index;
1352 PaHostApiInfo* _info;
1353 _pyAudio_paHostApiInfo* py_info;
1354
1355 if (!PyArg_ParseTuple(args, "i", &index))
when PyArg_ParseTuple() succeeds
taking False path
1356 return NULL;
1357
1358 _info = (PaHostApiInfo *) Pa_GetHostApiInfo(index);
1359
1360 if (!_info) {
when treating unknown const struct PaHostApiInfo * from src/_portaudiomodule.c:1358 as NULL
taking True path
1361 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
1362 Py_BuildValue("(s,i)",
1363 "Invalid host api info",
1364 paInvalidHostApi));
1365 return NULL;
1366 }
1367
1368 py_info = _create_paHostApiInfo_object();
1369 py_info->apiInfo = _info;
1370
1371 return (PyObject *) py_info;
1372 }