File: | src/_portaudiomodule.c |
Function: | _pyAudio_Stream_get_sampleRate |
Error: | memory leak: ob_refcnt of new ref from call to Py_BuildValue is 1 too high |
1054 static PyObject *
1055 _pyAudio_Stream_get_sampleRate(_pyAudio_Stream *self,
1056 void *closure)
1057 {
1058 /* sanity check */
1059 if (!_is_open(self)) {
when considering range: -0x80000000 <= value <= -1
taking False path
1060 PyErr_SetObject(PyExc_IOError,
1061 Py_BuildValue("(s,i)",
1062 "Stream closed",
1063 paBadStreamPtr));
1064 return NULL;
1065 }
1066
1067 /* sanity check */
1068 if ((!self->streamInfo)) {
when treating unknown struct PaStreamInfo * from src/_portaudiomodule.c:1068 as NULL
taking True path
1069 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
1070 Py_BuildValue("(s,i)",
1071 "No StreamInfo available",
1072 paBadStreamPtr));
1073 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
found 1 similar trace(s) to this
1074 }
1075
1076 return PyFloat_FromDouble(self->streamInfo->sampleRate);
1077 }
File: | src/_portaudiomodule.c |
Function: | _pyAudio_Stream_get_sampleRate |
Error: | memory leak: ob_refcnt of new ref from call to Py_BuildValue is 1 too high |
1054 static PyObject *
1055 _pyAudio_Stream_get_sampleRate(_pyAudio_Stream *self,
1056 void *closure)
1057 {
1058 /* sanity check */
1059 if (!_is_open(self)) {
when considering value == (int)0 from src/_portaudiomodule.c:1059
taking True path
1060 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
1061 Py_BuildValue("(s,i)",
1062 "Stream closed",
1063 paBadStreamPtr));
1064 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
1065 }
1066
1067 /* sanity check */
1068 if ((!self->streamInfo)) {
1069 PyErr_SetObject(PyExc_IOError,
1070 Py_BuildValue("(s,i)",
1071 "No StreamInfo available",
1072 paBadStreamPtr));
1073 return NULL;
1074 }
1075
1076 return PyFloat_FromDouble(self->streamInfo->sampleRate);
1077 }