File: alsaaudio.c
Function: alsamixer_volumecap
Error: ob_refcnt of new ref from (unknown) PyUnicodeUCS4_FromString is 1 too high
1206 static PyObject *
1207 alsamixer_volumecap(alsamixer_t *self, PyObject *args) 
1208 {
1209     PyObject *result;
1210     PyObject *item;
1211 
1212     if (!PyArg_ParseTuple(args,":volumecap")) return NULL;
when PyArg_ParseTuple() succeeds
taking False path
1213 
1214     if (!self->handle) 
when treating unknown struct snd_mixer_t * from alsaaudio.c:1214 as non-NULL
taking False path
1215     {
1216         PyErr_SetString(ALSAAudioError, "Mixer is closed");
1217         return NULL;
1218     }
1219 
1220     result = PyList_New(0);
when PyList_New() succeeds
1221     if (self->volume_cap&MIXER_CAP_VOLUME) 
when considering value == (int)0 from alsaaudio.c:1221
taking False path
1222     {
1223         item = PyUnicode_FromString("Volume");
1224         PyList_Append(result, item);
1225         Py_DECREF(item);
1226     }
1227     if (self->volume_cap&MIXER_CAP_VOLUME_JOINED) 
when considering value == (unsigned int)0 from alsaaudio.c:1227
taking False path
1228     {
1229         item = PyUnicode_FromString("Joined Volume"); 
1230         PyList_Append(result, item);
1231         Py_DECREF(item);
1232     }
1233     if (self->volume_cap&MIXER_CAP_PVOLUME) 
when considering value == (unsigned int)0 from alsaaudio.c:1233
taking False path
1234     {
1235         item = PyUnicode_FromString("Playback Volume");
1236         PyList_Append(result, item);
1237         Py_DECREF(item);
1238     }
1239     if (self->volume_cap&MIXER_CAP_PVOLUME_JOINED) 
when considering range: 1 <= value <= 8
taking True path
1240     {
1241         item = PyUnicode_FromString("Joined Playback Volume");
when PyUnicodeUCS4_FromString() succeeds
new ref from (unknown) PyUnicodeUCS4_FromString allocated at:         item = PyUnicode_FromString("Joined Playback Volume");
ob_refcnt is now refs: 1 + N where N >= 0
1242         PyList_Append(result, item);
when PyList_Append() succeeds
ob_refcnt is now refs: 2 + N where N >= 0
new ref from (unknown) PyUnicodeUCS4_FromString is now referenced by 1 non-stack value(s): PyListObject.ob_item[0]
1243         Py_DECREF(item);
taking True path
ob_refcnt is now refs: 1 + N where N >= 0
1244     }
1245     if (self->volume_cap&MIXER_CAP_CVOLUME) 
when considering value == (unsigned int)0 from alsaaudio.c:1245
taking False path
1246     {
1247         item = PyUnicode_FromString("Capture Volume");
1248         PyList_Append(result, item);
1249         Py_DECREF(item);
1250     }
1251     if (self->volume_cap&MIXER_CAP_CVOLUME_JOINED) 
when considering range: 1 <= value <= 32
taking True path
1252     {
1253         item = PyUnicode_FromString("Joined Capture Volume");
when PyUnicodeUCS4_FromString() succeeds
1254         PyList_Append(result, item);
when PyList_Append() succeeds
new ref from (unknown) PyUnicodeUCS4_FromString is now referenced by 0 non-stack value(s): 
1255         Py_DECREF(item);
taking True path
1256     }
1257 
1258     return result;
1259 }
ob_refcnt of new ref from (unknown) PyUnicodeUCS4_FromString is 1 too high
was expecting final ob_refcnt to be N + 0 (for some unknown N)
but final ob_refcnt is N + 1
found 1 similar trace(s) to this

File: alsaaudio.c
Function: alsamixer_volumecap
Error: dereferencing NULL (item->ob_refcnt) at alsaaudio.c:1255
1206 static PyObject *
1207 alsamixer_volumecap(alsamixer_t *self, PyObject *args) 
1208 {
1209     PyObject *result;
1210     PyObject *item;
1211 
1212     if (!PyArg_ParseTuple(args,":volumecap")) return NULL;
when PyArg_ParseTuple() succeeds
taking False path
1213 
1214     if (!self->handle) 
when treating unknown struct snd_mixer_t * from alsaaudio.c:1214 as non-NULL
taking False path
1215     {
1216         PyErr_SetString(ALSAAudioError, "Mixer is closed");
1217         return NULL;
1218     }
1219 
1220     result = PyList_New(0);
when PyList_New() succeeds
1221     if (self->volume_cap&MIXER_CAP_VOLUME) 
when considering value == (int)0 from alsaaudio.c:1221
taking False path
1222     {
1223         item = PyUnicode_FromString("Volume");
1224         PyList_Append(result, item);
1225         Py_DECREF(item);
1226     }
1227     if (self->volume_cap&MIXER_CAP_VOLUME_JOINED) 
when considering value == (unsigned int)0 from alsaaudio.c:1227
taking False path
1228     {
1229         item = PyUnicode_FromString("Joined Volume"); 
1230         PyList_Append(result, item);
1231         Py_DECREF(item);
1232     }
1233     if (self->volume_cap&MIXER_CAP_PVOLUME) 
when considering value == (unsigned int)0 from alsaaudio.c:1233
taking False path
1234     {
1235         item = PyUnicode_FromString("Playback Volume");
1236         PyList_Append(result, item);
1237         Py_DECREF(item);
1238     }
1239     if (self->volume_cap&MIXER_CAP_PVOLUME_JOINED) 
when considering range: 1 <= value <= 8
taking True path
1240     {
1241         item = PyUnicode_FromString("Joined Playback Volume");
when PyUnicodeUCS4_FromString() succeeds
1242         PyList_Append(result, item);
when PyList_Append() succeeds
1243         Py_DECREF(item);
taking True path
1244     }
1245     if (self->volume_cap&MIXER_CAP_CVOLUME) 
when considering value == (unsigned int)0 from alsaaudio.c:1245
taking False path
1246     {
1247         item = PyUnicode_FromString("Capture Volume");
1248         PyList_Append(result, item);
1249         Py_DECREF(item);
1250     }
1251     if (self->volume_cap&MIXER_CAP_CVOLUME_JOINED) 
when considering range: 1 <= value <= 32
taking True path
1252     {
1253         item = PyUnicode_FromString("Joined Capture Volume");
when PyUnicodeUCS4_FromString() fails
1254         PyList_Append(result, item);
returning -1 from PyList_Append() due to NULL item
1255         Py_DECREF(item);
dereferencing NULL (item->ob_refcnt) at alsaaudio.c:1255
found 4 similar trace(s) to this
1256     }
1257 
1258     return result;
1259 }

File: alsaaudio.c
Function: alsamixer_volumecap
Error: dereferencing NULL (item->ob_refcnt) at alsaaudio.c:1249
1206 static PyObject *
1207 alsamixer_volumecap(alsamixer_t *self, PyObject *args) 
1208 {
1209     PyObject *result;
1210     PyObject *item;
1211 
1212     if (!PyArg_ParseTuple(args,":volumecap")) return NULL;
when PyArg_ParseTuple() succeeds
taking False path
1213 
1214     if (!self->handle) 
when treating unknown struct snd_mixer_t * from alsaaudio.c:1214 as non-NULL
taking False path
1215     {
1216         PyErr_SetString(ALSAAudioError, "Mixer is closed");
1217         return NULL;
1218     }
1219 
1220     result = PyList_New(0);
when PyList_New() succeeds
1221     if (self->volume_cap&MIXER_CAP_VOLUME) 
when considering value == (int)0 from alsaaudio.c:1221
taking False path
1222     {
1223         item = PyUnicode_FromString("Volume");
1224         PyList_Append(result, item);
1225         Py_DECREF(item);
1226     }
1227     if (self->volume_cap&MIXER_CAP_VOLUME_JOINED) 
when considering value == (unsigned int)0 from alsaaudio.c:1227
taking False path
1228     {
1229         item = PyUnicode_FromString("Joined Volume"); 
1230         PyList_Append(result, item);
1231         Py_DECREF(item);
1232     }
1233     if (self->volume_cap&MIXER_CAP_PVOLUME) 
when considering value == (unsigned int)0 from alsaaudio.c:1233
taking False path
1234     {
1235         item = PyUnicode_FromString("Playback Volume");
1236         PyList_Append(result, item);
1237         Py_DECREF(item);
1238     }
1239     if (self->volume_cap&MIXER_CAP_PVOLUME_JOINED) 
when considering value == (unsigned int)0 from alsaaudio.c:1239
taking False path
1240     {
1241         item = PyUnicode_FromString("Joined Playback Volume");
1242         PyList_Append(result, item);
1243         Py_DECREF(item);
1244     }
1245     if (self->volume_cap&MIXER_CAP_CVOLUME) 
when considering range: 1 <= value <= 16
taking True path
1246     {
1247         item = PyUnicode_FromString("Capture Volume");
when PyUnicodeUCS4_FromString() fails
1248         PyList_Append(result, item);
returning -1 from PyList_Append() due to NULL item
1249         Py_DECREF(item);
dereferencing NULL (item->ob_refcnt) at alsaaudio.c:1249
1250     }
1251     if (self->volume_cap&MIXER_CAP_CVOLUME_JOINED) 
1252     {
1253         item = PyUnicode_FromString("Joined Capture Volume");
1254         PyList_Append(result, item);
1255         Py_DECREF(item);
1256     }
1257 
1258     return result;
1259 }